/* ── Analyze App Variables ── */
.analyze-app {
    --bg: #FAFAF8;
    --bg-strong: #f1eadf;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-soft: #faf6f0;
    --text: #1f2933;
    --heading: #172029;
    --muted: #62707c;
    --muted-strong: #495661;
    --muted-soft: #7a8894;
    --border: rgba(92, 111, 125, 0.14);
    --border-strong: rgba(92, 111, 125, 0.24);
    --brand: #2AABB8;
    --brand-strong: #1A6B75;
    --brand-soft: rgba(42, 171, 184, 0.1);
    --shadow: 0 18px 40px rgba(56, 46, 34, 0.08);
    --shadow-soft: 0 8px 18px rgba(56, 46, 34, 0.05);
    --personal: #2AABB8;
    --personal-soft: rgba(42, 171, 184, 0.1);
    --doctor: #466f99;
    --doctor-soft: rgba(70, 111, 153, 0.1);
    --warn: #bf5b41;
    --warn-soft: rgba(191, 91, 65, 0.1);
    --safe: #567c55;
    --safe-soft: rgba(86, 124, 85, 0.1);
    --pattern: #7a678f;
    --pattern-soft: rgba(122, 103, 143, 0.1);
    --danger-bg: #fff1f0;
    --danger-border: #efc4bf;
    --danger-text: #b8493d;
}

/* Report inherits the same variables */
.analyze-report {
    --bg: #FAFAF8;
    --bg-strong: #f1eadf;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-soft: #faf6f0;
    --text: #1f2933;
    --heading: #172029;
    --muted: #62707c;
    --muted-strong: #495661;
    --muted-soft: #7a8894;
    --border: rgba(92, 111, 125, 0.14);
    --border-strong: rgba(92, 111, 125, 0.24);
    --brand: #2AABB8;
    --brand-strong: #1A6B75;
    --brand-soft: rgba(42, 171, 184, 0.1);
    --shadow: 0 18px 40px rgba(56, 46, 34, 0.08);
    --shadow-soft: 0 8px 18px rgba(56, 46, 34, 0.05);
    --personal: #2AABB8;
    --personal-soft: rgba(42, 171, 184, 0.1);
    --doctor: #466f99;
    --doctor-soft: rgba(70, 111, 153, 0.1);
    --warn: #bf5b41;
    --warn-soft: rgba(191, 91, 65, 0.1);
    --safe: #567c55;
    --safe-soft: rgba(86, 124, 85, 0.1);
    --pattern: #7a678f;
    --pattern-soft: rgba(122, 103, 143, 0.1);
    --danger-bg: #fff1f0;
    --danger-border: #efc4bf;
    --danger-text: #b8493d;
}

/* ── Landing Page ── */
.analyze-app .az-hero { max-width: 760px; margin: 0 auto; padding: 3.2rem 0 1.6rem; text-align: center; }
.analyze-app .az-eyebrow { display: inline-flex; align-items: center; padding: 0.42rem 0.8rem; border-radius: 6px; background: rgba(255,255,255,0.78); border: 1px solid rgba(92,111,125,0.12); color: var(--brand); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.analyze-app .az-hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--heading); margin-bottom: 1rem; }
.analyze-app .az-hero h1 em { font-style: normal; color: var(--brand); }
.analyze-app .az-tagline { max-width: 40rem; margin: 0 auto 1.35rem; font-size: 1.05rem; line-height: 1.78; color: var(--muted); }
.analyze-app .az-cta-row { display: flex; justify-content: center; margin-bottom: 1rem; }
.analyze-app .az-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 1rem 1.45rem; border-radius: 6px; text-decoration: none; font-size: 0.98rem; font-weight: 800; letter-spacing: -0.01em; transition: transform 0.2s, box-shadow 0.2s; border: none; cursor: pointer; font-family: inherit; }
.analyze-app .az-btn-primary { background: var(--brand); color: #fff; box-shadow: 4px 4px 0 rgba(0,0,0,0.12); }
.analyze-app .az-btn-primary:hover { background: var(--brand-strong, #1A6B75); box-shadow: 2px 2px 0 rgba(0,0,0,0.1); }
.analyze-app .az-btn-secondary { background: rgba(255,255,255,0.82); color: var(--text); border: 1px solid var(--border); box-shadow: 4px 4px 0 rgba(0,0,0,0.06); }
.analyze-app .az-btn-secondary:hover { background: #fff; border-color: var(--border-strong); box-shadow: 2px 2px 0 rgba(0,0,0,0.06); }
.analyze-app .az-btn .arrow { transition: transform 0.2s; }
.analyze-app .az-btn:hover .arrow { transform: translateX(3px); }
.analyze-app .az-trust-note { font-size: 0.9rem; line-height: 1.7; color: var(--muted); margin-bottom: 1.35rem; text-align: center; }
.analyze-app .az-proof-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.85rem; color: var(--muted-strong); font-size: 0.88rem; font-weight: 700; text-align: center; }
.analyze-app .az-proof-row span { display: inline-flex; align-items: center; gap: 0.85rem; }
.analyze-app .az-proof-row span:not(:last-child)::after { content: '\2022'; color: rgba(92,111,125,0.45); }

/* ── Connect Section ── */
.az-connect-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.az-connect-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .az-connect-options { grid-template-columns: 1fr; }
}

.az-connect-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.az-connect-card:hover {
  box-shadow: 6px 6px 0 rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.az-connect-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.az-connect-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.az-connect-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.az-connect-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.az-sheets-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.az-sheets-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  min-width: 0;
  transition: border-color 0.2s;
}

.az-sheets-input:focus {
  outline: none;
  border-color: var(--brand);
}

.az-sheets-input::placeholder {
  color: var(--muted-soft);
  font-size: 0.8rem;
}

.az-sheets-input-row .az-btn {
  padding: 10px 18px;
  white-space: nowrap;
  font-size: 0.875rem;
}

.az-help-trigger {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.az-help-trigger:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

/* ── Help Modal ── */
.az-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.az-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.az-modal {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.az-modal h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  color: var(--heading);
  margin-bottom: 20px;
}

.az-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

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

.az-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.az-modal-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.az-modal-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.az-modal-step strong {
  color: var(--heading);
}

.az-modal-note {
  font-size: 0.8125rem;
  color: #57534E;
  line-height: 1.5;
  border-top: 1px solid #E7E5E4;
  padding-top: 14px;
  margin: 0;
}

/* ── Benefits section ── */
.analyze-app .az-benefits-section,
.analyze-app .az-steps-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.analyze-app .az-benefits-section {
  border-top: 1px solid rgba(92,111,125,0.1);
}

.analyze-app .az-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.analyze-app .az-section-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 0.65rem;
}

.analyze-app .az-section-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.analyze-app .az-section-copy {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto;
}

/* Benefit cards — 3-column grid */
.analyze-app .az-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.analyze-app .az-benefit-card {
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(92,111,125,0.12);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.analyze-app .az-benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.analyze-app .az-benefit-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.analyze-app .az-benefit-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.analyze-app .az-benefit-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Steps section ── */
.analyze-app .az-steps-section {
  background: #EEF6F7;
  border-radius: var(--radius-sm, 8px);
  max-width: 100%;
  padding: 3.5rem 2rem;
  margin-bottom: 2rem;
}

.analyze-app .az-steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.analyze-app .az-step-card {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.analyze-app .az-step-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1.15rem;
}

.analyze-app .az-step-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.analyze-app .az-step-card p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
}

.analyze-app .az-step-divider {
  width: 1px;
  background: rgba(42,171,184,0.25);
  align-self: stretch;
  margin-top: 10px;
  flex: 0 0 1px;
}

/* Error alert */
.analyze-app .az-error-alert { display: none; max-width: 500px; margin: 1rem auto; padding: 1rem 1.2rem; background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 6px; color: var(--danger-text); font-size: 0.875rem; text-align: center; }
.analyze-app .az-error-alert.visible { display: block; }

/* ── Dashboard ── */
.analyze-app .az-dashboard { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.analyze-app .az-dashboard-hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(240px,0.8fr); gap: 1.5rem; margin-bottom: 1.75rem; }
.analyze-app .az-dashboard-hero-copy { padding: 0.5rem 0; }
.analyze-app .az-dashboard h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; line-height: 1.05; margin-bottom: 0.85rem; color: var(--heading); letter-spacing: -0.04em; }
.analyze-app .az-dashboard .subtitle { color: var(--muted); font-size: 1rem; line-height: 1.75; max-width: 40rem; }
.analyze-app .az-hero-card { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,250,248,0.92)); border: 1px solid rgba(92,111,125,0.12); border-radius: 8px; padding: 1.4rem; box-shadow: var(--shadow-soft); align-self: end; }
.analyze-app .az-hero-card-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
.analyze-app .az-hero-card-title { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.analyze-app .az-hero-card p { font-size: 0.9rem; line-height: 1.7; color: var(--muted); }

/* Analysis panel (form) */
.analyze-app .az-panel { background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(252,249,245,0.92)); border: 1px solid rgba(92,111,125,0.14); border-radius: 8px; padding: 2rem; box-shadow: var(--shadow); }
.analyze-app .az-form-group { margin-bottom: 1.75rem; }
.analyze-app .az-form-label { display: block; font-size: 0.75rem; font-weight: 800; color: var(--muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.analyze-app .az-radio-group { display: flex; flex-direction: column; gap: 0.75rem; }
.analyze-app .az-radio-option { display: flex; align-items: center; gap: 0.65rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; font-size: 0.95rem; font-weight: 600; color: var(--text); background: var(--surface); }
.analyze-app .az-radio-option:hover { border-color: var(--border-strong); background: var(--surface-strong); transform: translateY(-1px); }
.analyze-app .az-radio-option input[type="radio"] { accent-color: var(--brand); }
.analyze-app .az-radio-option.selected { border-color: rgba(42,171,184,0.28); background: linear-gradient(180deg, rgba(42,171,184,0.07), rgba(255,255,255,0.95)); box-shadow: 0 10px 22px rgba(42,171,184,0.08); }

/* Report type cards */
.analyze-app .az-report-type-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.analyze-app .az-report-type-card { position: relative; display: flex; flex-direction: column; gap: 0.25rem; min-height: 186px; padding: 1.25rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s; background: linear-gradient(180deg, var(--surface-strong), #fbf7f1); box-shadow: var(--shadow-soft); }
.analyze-app .az-report-type-card:hover { border-color: rgba(42,171,184,0.24); transform: translateY(-2px); box-shadow: 0 18px 28px rgba(56,46,34,0.08); }
.analyze-app .az-report-type-card.selected { border-color: var(--brand); border-width: 2px; background: linear-gradient(180deg, rgba(42,171,184,0.1), #ffffff 50%); box-shadow: 0 8px 20px rgba(42,171,184,0.15); position: relative; }
.analyze-app .az-report-type-card.selected::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; border-radius: 50%; font-size: 0.7rem; font-weight: 800; }
.analyze-app .az-report-type-card.selected .card-title { color: var(--brand); }
.analyze-app .az-report-type-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.analyze-app .az-report-type-card .card-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }
.analyze-app .az-report-type-card .card-title { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 0.15rem; }
.analyze-app .az-report-type-card .card-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }

/* Custom dates */
.analyze-app .az-custom-dates { display: none; gap: 0.9rem; margin-top: 0.75rem; }
.analyze-app .az-custom-dates.visible { display: flex; }
.analyze-app .az-custom-dates input[type="date"] { flex: 1; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; color: var(--text); background: var(--surface-strong); font-family: inherit; }
.analyze-app .az-custom-dates input[type="date"]:focus { outline: none; border-color: rgba(42,171,184,0.36); box-shadow: 0 0 0 4px rgba(42,171,184,0.12); }

/* Privacy note in dashboard */
.analyze-app .az-privacy-note { margin-top: 1.2rem; padding: 0.95rem 1rem; background: rgba(255,255,255,0.58); border: 1px solid rgba(92,111,125,0.12); border-radius: 6px; font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* Error toast */
.analyze-app .az-error-toast { display: none; margin-top: 1rem; padding: 0.9rem 1rem; background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 6px; color: var(--danger-text); font-size: 0.875rem; line-height: 1.5; }
.analyze-app .az-error-toast.visible { display: block; }

/* Workspace badge */
.analyze-app .az-workspace-badge { font-size: 0.875rem; color: var(--muted); margin-bottom: 1rem; }
.analyze-app .az-workspace-badge strong { color: var(--brand); }

/* Generate button (full width) */
.analyze-app .az-generate-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 1rem 1.3rem; background: var(--brand); color: #fff; border: none; border-radius: 6px; font-size: 0.98rem; font-weight: 800; cursor: pointer; font-family: inherit; margin-top: 1.75rem; box-shadow: 4px 4px 0 rgba(0,0,0,0.12); transition: transform 0.2s, box-shadow 0.2s; }
.analyze-app .az-generate-btn:hover { background: var(--brand-strong, #1A6B75); box-shadow: 2px 2px 0 rgba(0,0,0,0.1); }
.analyze-app .az-generate-btn:disabled { background: #cfd6da; color: #7a8790; cursor: not-allowed; box-shadow: none; }
.analyze-app .az-generate-btn .arrow { font-size: 1.125rem; transition: transform 0.2s; }
.analyze-app .az-generate-btn:hover .arrow { transform: translateX(3px); }

/* ── Report ── */

/* Report container */
.analyze-report .report-container { max-width: 940px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* Report header */
.analyze-report .report-header { margin-bottom: 2rem; background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,250,248,0.92)); border: 1px solid var(--border); border-radius: 8px; padding: 2rem; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; }
.analyze-report .report-header::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, rgba(42,171,184,0.88), rgba(122,103,143,0.5)); }
.analyze-report.report-doctor .report-header::after { background: linear-gradient(90deg, rgba(70,111,153,0.88), rgba(122,103,143,0.35)); }
.analyze-report .report-header h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; color: var(--heading); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; line-height: 1.08; letter-spacing: -0.04em; }

/* Report badge */
.analyze-report .report-badge { display: inline-block; padding: 0.42rem 0.72rem; border-radius: 6px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid transparent; font-family: 'Plus Jakarta Sans', sans-serif; }
.analyze-report .badge-personal { background: var(--personal-soft); color: var(--personal); border-color: rgba(42,171,184,0.18); }
.analyze-report .badge-doctor { background: var(--doctor-soft); color: var(--doctor); border-color: rgba(70,111,153,0.18); }

/* Report meta */
.analyze-report .report-meta { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.5rem 0.8rem; border-radius: 6px; background: rgba(255,255,255,0.85); border: 1px solid rgba(92,111,125,0.12); font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.analyze-report .report-disclaimer { margin-top: 0.85rem; font-size: 0.75rem; color: var(--muted-soft); letter-spacing: 0.01em; }

/* Stats bar */
.analyze-report .stats-bar { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-bottom: 2rem; }
.analyze-report .stat { background: rgba(255,255,255,0.86); border: 1px solid var(--border); border-radius: 8px; padding: 1.15rem 1rem; text-align: left; box-shadow: var(--shadow-soft); }
.analyze-report .stat-num { font-size: 1.9rem; font-weight: 800; color: var(--personal); line-height: 1; }
.analyze-report.report-doctor .stat-num { color: var(--doctor); }
.analyze-report .stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; margin-top: 0.35rem; }
.analyze-report.report-personal .stat:nth-child(1) { border-color: rgba(42,171,184,0.2); background: linear-gradient(180deg, rgba(237,249,250,0.98), rgba(255,255,255,0.98)); }
.analyze-report.report-personal .stat:nth-child(2) { border-color: rgba(191,91,65,0.16); background: linear-gradient(180deg, rgba(255,248,244,0.98), rgba(255,255,255,0.98)); }
.analyze-report.report-personal .stat:nth-child(2) .stat-num { color: var(--warn); }
.analyze-report.report-personal .stat:nth-child(3) { border-color: rgba(122,103,143,0.16); background: linear-gradient(180deg, rgba(249,246,253,0.98), rgba(255,255,255,0.98)); }
.analyze-report.report-personal .stat:nth-child(3) .stat-num { color: var(--pattern); }

/* Report summary shell */
.analyze-report .report-summary-shell { margin-bottom: 1.5rem; padding: 1.5rem; border-radius: 8px; border: 1px solid rgba(42,171,184,0.14); background: linear-gradient(180deg, rgba(237,249,250,0.98), rgba(255,255,255,0.98)); box-shadow: var(--shadow); }
.analyze-report .report-summary-header { margin-bottom: 1rem; }
.analyze-report .report-summary-kicker { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--personal); margin-bottom: 0.45rem; }
.analyze-report .report-summary-header h2 { font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.03em; color: var(--heading); margin-bottom: 0.35rem; }
.analyze-report .report-summary-header p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.analyze-report .summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.9rem; margin-bottom: 1rem; }
.analyze-report .summary-card { padding: 1rem; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.88); box-shadow: var(--shadow-soft); }
.analyze-report .summary-card-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.55rem; }
.analyze-report .summary-card-text { font-size: 0.97rem; line-height: 1.75; color: var(--heading); font-weight: 600; }
.analyze-report .summary-card.tone-warn { background: linear-gradient(180deg, rgba(255,248,244,0.98), rgba(255,255,255,0.98)); border-color: rgba(191,91,65,0.18); }
.analyze-report .summary-card.tone-safe { background: linear-gradient(180deg, rgba(246,251,245,0.98), rgba(255,255,255,0.98)); border-color: rgba(86,124,85,0.18); }
.analyze-report .summary-card.tone-pattern { background: linear-gradient(180deg, rgba(249,246,253,0.98), rgba(255,255,255,0.98)); border-color: rgba(122,103,143,0.18); }

/* Report body */
.analyze-report .report-body { margin-bottom: 2rem; background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,253,249,0.96)); border: 1px solid var(--border); border-radius: 8px; padding: 2rem; box-shadow: var(--shadow); }
.analyze-report.report-personal .report-body { display: grid; gap: 1.15rem; background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(252,248,242,0.98)); }

/* Report sections */
.analyze-report .report-section { margin-bottom: 2.5rem; }
.analyze-report.report-personal .report-section { margin-bottom: 0; padding: 1.35rem 1.4rem 1.45rem; background: rgba(255,255,255,0.98); border: 1px solid rgba(92,111,125,0.12); border-radius: 8px; box-shadow: 0 8px 20px rgba(67,54,39,0.04); position: relative; overflow: hidden; }
.analyze-report.report-personal .report-section + .report-section { margin-top: 0.1rem; }
.analyze-report .report-section:last-child { margin-bottom: 0; }
.analyze-report .report-section h3 { font-size: 0.72rem; font-weight: 800; color: var(--muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.analyze-report.report-personal .report-section h3 { display: flex; align-items: center; gap: 0.65rem; font-size: 1rem; color: var(--heading); margin-bottom: 1rem; letter-spacing: -0.01em; text-transform: none; font-weight: 800; padding-bottom: 0.8rem; border-bottom: 1px solid rgba(92,111,125,0.1); }
.analyze-report.report-personal .report-section h3::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: rgba(42,171,184,0.28); flex: 0 0 auto; }
.analyze-report.report-doctor .report-section h3 { font-size: 0.82rem; font-weight: 800; color: var(--heading); letter-spacing: 0.04em; padding-bottom: 0.65rem; border-bottom: 1px solid var(--border); margin-bottom: 1.15rem; text-align: left; }
.analyze-report .report-section p { font-size: 1rem; line-height: 1.85; color: var(--text); margin-bottom: 0.75rem; text-align: left; }
.analyze-report.report-personal .report-section p { font-size: 1rem; line-height: 1.82; }
.analyze-report.report-personal .report-section p + p { color: #3a4a56; }
.analyze-report.report-personal .report-section p:first-of-type { color: #344451; font-weight: 500; }
.analyze-report .report-section p:last-child { margin-bottom: 0; }

/* Section variants — triggers */
.analyze-report.report-personal .section-triggers { border-color: rgba(191,91,65,0.2); }
.analyze-report.report-personal .section-triggers h3, .analyze-report.report-personal .section-worst-nights h3 { color: var(--warn); }
.analyze-report.report-personal .section-triggers h3::before, .analyze-report.report-personal .section-worst-nights h3::before { background: rgba(191,91,65,0.16); box-shadow: inset 0 0 0 1px rgba(191,91,65,0.18); }
.analyze-report.report-personal .section-triggers li { border-top-color: rgba(191,91,65,0.14); }
.analyze-report.report-personal .section-triggers strong, .analyze-report.report-personal .section-worst-nights strong, .analyze-report .summary-card.tone-warn .summary-card-text strong { background: rgba(191,91,65,0.12) !important; color: #9b4934 !important; }

/* Section variants — actions */
.analyze-report .section-actions h3 { color: var(--personal); }
.analyze-report.report-personal .section-actions { border-color: rgba(42,171,184,0.22); padding: 1rem 1.05rem 1.05rem; box-shadow: 0 10px 24px rgba(42,171,184,0.05); }
.analyze-report.report-personal .section-actions h3::before { background: rgba(42,171,184,0.14); box-shadow: inset 0 0 0 1px rgba(42,171,184,0.16); }
.analyze-report.report-personal .section-actions h3 { margin-bottom: 0.65rem; padding-bottom: 0.65rem; }
.analyze-report.report-doctor .section-actions h3 { color: var(--doctor); border-bottom-color: rgba(70,111,153,0.18); }

/* Section variants — patterns */
.analyze-report.report-personal .section-patterns { border-color: rgba(122,103,143,0.18); }
.analyze-report .section-patterns h3 { color: var(--pattern) !important; }
.analyze-report.report-personal .section-patterns h3::before { background: rgba(122,103,143,0.16); box-shadow: inset 0 0 0 1px rgba(122,103,143,0.18); }
.analyze-report.report-personal .section-patterns strong { background: rgba(122,103,143,0.1); color: #5f4f73; }

/* Section variants — safe foods */
.analyze-report .section-safe-foods h3 { color: var(--safe) !important; }
.analyze-report.report-personal .section-safe-foods { border-color: rgba(86,124,85,0.18); }
.analyze-report.report-personal .section-safe-foods h3::before { background: rgba(86,124,85,0.16); box-shadow: inset 0 0 0 1px rgba(86,124,85,0.18); }
.analyze-report.report-personal .section-safe-foods strong { background: rgba(86,124,85,0.12); color: #456744; }

/* Section variants — summary/clinical */
.analyze-report .section-clinical-summary p { font-size: 1.02rem; line-height: 1.9; color: #22303a; }
.analyze-report.report-personal .section-summary, .analyze-report.report-personal .section-clinical-summary { padding: 1.45rem; background: linear-gradient(180deg, rgba(237,249,250,0.98), rgba(255,255,255,0.98)); border-color: rgba(42,171,184,0.16); }
.analyze-report.report-personal .section-summary h3, .analyze-report.report-personal .section-clinical-summary h3 { color: var(--personal); }
.analyze-report.report-personal .section-summary h3::before, .analyze-report.report-personal .section-clinical-summary h3::before { background: rgba(42,171,184,0.16); box-shadow: inset 0 0 0 1px rgba(42,171,184,0.18); }

/* Section variants — methodology */
.analyze-report .section-methodology h3 { color: var(--muted) !important; }
.analyze-report .section-methodology p, .analyze-report .section-methodology li { color: var(--muted) !important; font-size: 0.875rem !important; }

/* Section variants — quotes */
.analyze-report.report-personal .section-quotes { background: linear-gradient(180deg, rgba(248,245,240,0.96), rgba(255,255,255,0.98)); }

/* Tables */
.analyze-report .report-section table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1rem 0; font-size: 0.85rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.analyze-report .report-section th { text-align: left; padding: 0.8rem 0.95rem; font-weight: 800; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; background: #f6f1e8; }
.analyze-report .report-section td { padding: 0.85rem 0.95rem; color: var(--text); border-bottom: 1px solid rgba(92,111,125,0.1); line-height: 1.5; }
.analyze-report .report-section td:first-child { font-weight: 600; color: var(--heading); white-space: nowrap; }
.analyze-report .report-section tbody tr:last-child td { border-bottom: none; }
.analyze-report .report-section tbody tr:nth-child(even) { background: rgba(248,244,237,0.7); }

/* Blockquotes */
.analyze-report .report-section blockquote { margin: 0 0 0.625rem; padding: 1rem 1.1rem; background: #fbf8f3; border: 1px solid var(--border); border-left: 3px solid #b8a996; border-radius: 8px; font-size: 0.92rem; line-height: 1.75; color: var(--text); font-style: italic; }
.analyze-report .report-section blockquote:last-child { margin-bottom: 0; }
.analyze-report .quote-context { font-style: normal; font-size: 0.75rem; color: var(--muted); display: block; margin-top: 0.25rem; }

/* Lists */
.analyze-report .report-section ul { margin: 0.5rem 0; padding-left: 0; list-style: none; }
.analyze-report .report-section li { font-size: 0.98rem; line-height: 1.75; color: var(--text); margin-bottom: 0.85rem; padding: 1rem 1.1rem; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 8px; }
.analyze-report.report-personal .report-section ul { margin: 0.15rem 0 0; }
.analyze-report.report-personal .report-section li { margin-bottom: 0; padding: 0.95rem 0; background: transparent; border: 0; border-top: 1px solid rgba(92,111,125,0.1); border-radius: 0; box-shadow: none; }
.analyze-report.report-personal .report-section li:first-child { border-top: 0; padding-top: 0.1rem; }
.analyze-report.report-personal .report-section li:last-child { padding-bottom: 0; }
.analyze-report .report-section li:last-child { margin-bottom: 0; }

/* Insight items */
.analyze-report .insight-item-title { font-size: 1rem; line-height: 1.45; color: var(--heading); font-weight: 800; margin-bottom: 0.28rem; letter-spacing: -0.01em; }
.analyze-report .insight-item-body { font-size: 0.97rem; line-height: 1.78; color: #465563; }

/* Bold/strong */
.analyze-report .report-section strong { color: var(--heading); font-weight: 700; }
.analyze-report.report-personal .report-section strong { display: inline; padding: 0.08rem 0.38rem; border-radius: 0.5rem; background: rgba(42,171,184,0.08); color: #1A6B75; font-weight: 800; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Action items */
.analyze-report .action-list { padding-left: 0 !important; margin-top: 0 !important; }
.analyze-report .action-item { display: flex; align-items: flex-start; gap: 0.75rem; background: rgba(42,171,184,0.06) !important; border-color: rgba(42,171,184,0.16) !important; }
.analyze-report.report-personal .action-item { padding: 1rem 0; background: transparent !important; border: 0 !important; border-top: 1px solid rgba(42,171,184,0.14) !important; border-radius: 0; margin-bottom: 0; }
.analyze-report.report-personal .action-item:first-child { border-top: 0 !important; padding-top: 0.15rem; }
.analyze-report.report-personal .action-item:last-child { padding-bottom: 0; }
.analyze-report .action-num { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-width: 26px; border-radius: 50%; background: rgba(42,171,184,0.14); color: var(--personal); font-size: 0.76rem; font-weight: 900; margin-top: 1px; }
.analyze-report .action-text { flex: 1; color: var(--heading); font-weight: 750; font-size: 1rem; line-height: 1.72; letter-spacing: -0.01em; }

/* Tolerated foods */
.analyze-report .tolerated-foods-block { margin: 0.75rem 0; padding: 1rem; background: #fbf9f5; border: 1px solid var(--border); border-radius: 8px; }
.analyze-report .tolerated-row { margin-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.6; }
.analyze-report .tolerated-row:last-child { margin-bottom: 0; }
.analyze-report .tolerated-label { display: inline-block; width: 80px; font-weight: 700; color: var(--heading); }
.analyze-report .section-safe-foods .tolerated-foods-block { background: var(--safe-soft); border-color: rgba(86,124,85,0.15); }
.analyze-report .section-safe-foods .tolerated-label { color: var(--safe); }

/* Worst nights */
.analyze-report .worst-nights-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 0; }
.analyze-report .worst-night-card { padding: 1rem 1.1rem; background: rgba(191,91,65,0.06); border: 1px solid rgba(191,91,65,0.15); border-left: 3px solid var(--warn); border-radius: 8px; }
.analyze-report .worst-night-meal { font-weight: 800; color: var(--heading); font-size: 1rem; line-height: 1.5; }
.analyze-report .worst-night-severity { margin-left: 0.5rem; font-weight: 800; color: var(--warn); font-size: 0.875rem; }
.analyze-report .worst-night-triggers { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; line-height: 1.5; }

/* Report actions */
.analyze-report .report-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-start; }
.analyze-report.report-personal .report-actions { padding: 1rem 1.1rem; background: rgba(255,255,255,0.72); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-soft); }

/* ── Loading Overlay ── */
.analyze-app .az-loading { display: none; position: fixed; inset: 0; background: rgba(250,250,248,0.88); backdrop-filter: blur(10px); z-index: 100; flex-direction: column; align-items: center; justify-content: center; }
.analyze-app .az-loading.visible { display: flex; }
.analyze-app .az-spinner { width: 36px; height: 36px; border: 3px solid rgba(92,111,125,0.2); border-top-color: var(--brand); border-radius: 50%; animation: az-spin 0.8s linear infinite; margin-bottom: 1rem; }
@keyframes az-spin { to { transform: rotate(360deg); } }
.analyze-app .az-loading-text { font-size: 0.975rem; color: var(--text); font-weight: 700; }
.analyze-app .az-loading-subtext { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

/* ── Trigger Chart ── */
.analyze-report .trigger-chart {
  margin-bottom: 2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.analyze-report .trigger-chart-header {
  background: var(--brand, #2AABB8);
  padding: 1.25rem 1.5rem;
  color: #fff;
}

.analyze-report .trigger-chart-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 0.3rem;
}

.analyze-report .trigger-chart-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.analyze-report .trigger-chart-body {
  padding: 1.25rem 1.5rem;
}

.analyze-report .trigger-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(92,111,125,0.08);
}

.analyze-report .trigger-row:last-child {
  border-bottom: none;
}

.analyze-report .trigger-name {
  flex: 0 0 140px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading);
}

.analyze-report .trigger-bar-wrap {
  flex: 1;
  height: 12px;
  background: #f0f0ee;
  border-radius: 6px;
  overflow: hidden;
}

.analyze-report .trigger-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease-out;
}

.analyze-report .trigger-bar.risk-high {
  background: linear-gradient(90deg, #E37434, #d45a1a);
}

.analyze-report .trigger-bar.risk-moderate {
  background: linear-gradient(90deg, #F5C842, #e8b520);
}

.analyze-report .trigger-bar.risk-low {
  background: linear-gradient(90deg, #4ADE80, #22c55e);
}

.analyze-report .trigger-risk-label {
  flex: 0 0 90px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 800;
}

.analyze-report .trigger-risk-label.risk-high {
  color: #E37434;
}

.analyze-report .trigger-risk-label.risk-moderate {
  color: #C9A020;
}

.analyze-report .trigger-risk-label.risk-low {
  color: #22c55e;
}

/* Responsive trigger chart */
@media (max-width: 600px) {
  .analyze-report .trigger-name {
    flex: 0 0 100px;
    font-size: 0.8rem;
  }
  .analyze-report .trigger-risk-label {
    flex: 0 0 70px;
    font-size: 0.75rem;
  }
  .analyze-report .trigger-chart-header {
    padding: 1rem 1.25rem;
  }
  .analyze-report .trigger-chart-body {
    padding: 1rem 1.25rem;
  }
}

/* ── Responsive ── */
@media (max-width: 820px) {
    .analyze-app .az-benefits-grid { grid-template-columns: 1fr; }
    .analyze-app .az-steps-row { flex-direction: column; gap: 1.5rem; }
    .analyze-app .az-step-divider { width: 60px; height: 1px; align-self: center; margin: 0; }
    .analyze-app .az-dashboard-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .analyze-report .stats-bar, .analyze-report .summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .analyze-app .az-hero { padding-top: 1.7rem; text-align: left; }
    .analyze-app .az-hero h1 { font-size: 2.6rem; }
    .analyze-app .az-tagline { font-size: 0.98rem; margin-left: 0; }
    .analyze-app .az-cta-row { flex-direction: column; align-items: flex-start; }
    .analyze-app .az-btn { width: 100%; }
    .analyze-app .az-proof-row { justify-content: flex-start; gap: 0.55rem; }
    .analyze-app .az-proof-row span { display: block; }
    .analyze-app .az-proof-row span::after { display: none; }
    .analyze-app .az-benefits-section, .analyze-app .az-steps-section { padding: 2.5rem 1rem; }
    .analyze-app .az-custom-dates { flex-direction: column; }
    .analyze-app .az-report-type-group { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .analyze-report .report-container { padding: 1.5rem 1rem 2.5rem; }
    .analyze-report .report-actions { flex-direction: column; }
    .analyze-report .report-header, .analyze-report .report-body, .analyze-report .report-summary-shell { padding: 1.35rem; border-radius: 6px; }
    .analyze-report.report-personal .report-section { padding: 1.15rem 1.1rem; border-radius: 6px; }
}
