/* ============================================================
   Prospect Feed Audit — Design System
   Figma: Audit Report (1400px wide, desktop only)
   Fonts: Inter (body), Fira Code (mono badges)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@500&display=swap');

/* ============================================================ Tokens */
:root {
  /* Brand */
  --brand-navy:    #001727;
  --brand-blue:    #1d4990;

  /* Grays */
  --gray-50:  #f0f1f1;
  --gray-75:  #e9eaeb;
  --gray-100: #e1e2e4;
  --gray-200: #c3c6c9;
  --gray-500: #697077;
  --gray-700: #3f4347;
  --gray-850: #1f2224;
  --gray-900: #151618;

  /* Brand blue scale */
  --blue-900: #060f1d;

  /* Status */
  --green-100: #d3ecda;
  --green-200: #a7d9b6;
  --green-500: #24a148;
  --green-600: #1d813a;
  --green-650: #197132;
  --red-75:    #fcdcdd;
  --red-500:   #e9131e;
  --red-600:   #ba0f18;
  --orange-100:#fbe0cc;
  --orange-500:#eb6200;

  /* Badge colours */
  --bronze-text: #6e3a1e;
  --bronze-bg:   rgba(186,130,90,0.2);
  --silver-text: #4b5563;
  --silver-bg:   rgba(156,163,175,0.15);
  --gold-text:   #92700c;
  --gold-bg:     rgba(234,179,8,0.15);
  --failed-text: #ba0f18;
  --failed-bg:   rgba(249,47,57,0.15);

  /* Layout */
  --max-w:    1000px;
  --px:       200px;
  --radius:   2px;
  --card-r:   10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-900);
  background: white;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   LANDING PAGE (form)
   ============================================================ */

.landing-page { min-height: 100vh; display: flex; flex-direction: column; }
.landing-page.hidden { display: none; }

/* Shared nav */
.nav-bar {
  position: sticky; top: 0; z-index: 200;
  background: white;
  border-bottom: 1px solid var(--gray-50);
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px var(--px);
  height: 60px;
}
.nav-left { display: flex; align-items: center; gap: 20px; }
.nav-logo { font-size: 18px; font-weight: 600; color: var(--blue-900); letter-spacing: -0.3px; }
.nav-divider { width: 1px; height: 26px; background: var(--gray-75); }
.nav-label { font-size: 14px; font-weight: 500; color: var(--gray-900); }
.nav-right { display: flex; align-items: center; gap: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: none; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 400;
  cursor: pointer; white-space: nowrap;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-outline { background: white; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-dark    { background: var(--gray-700); color: white; }
.btn-primary { background: var(--brand-blue); color: white; }
.btn-navy    { background: var(--brand-navy); color: white; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; font-weight: 500; border-radius: 4px; }
.btn-full { width: 100%; }

/* Hero / form */
.hero { background: linear-gradient(180deg,rgba(29,73,144,.07) 0%,rgba(29,73,144,0) 100%),white; padding: 72px var(--px); text-align: center; }
.hero h1 { font-size: 40px; font-weight: 600; color: var(--blue-900); margin-bottom: 14px; line-height: 1.2; }
.hero p  { font-size: 17px; color: var(--gray-500); max-width: 540px; margin: 0 auto 36px; }

.form-card {
  background: white; border: 1px solid var(--gray-75); border-radius: var(--card-r);
  padding: 36px; max-width: 580px; margin: 0 auto; text-align: left;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.form-card h2  { font-size: 22px; font-weight: 600; color: var(--blue-900); margin-bottom: 6px; }
.form-subtitle { font-size: 13px; color: var(--gray-500); margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-850); margin-bottom: 5px; }
.form-group input, .form-group select {
  width: 100%; height: 40px; padding: 0 11px;
  border: 1px solid var(--gray-200); border-radius: 6px;
  font-family: inherit; font-size: 14px; color: var(--gray-900);
  outline: none; transition: border-color .15s, box-shadow .15s;
  background: white;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(29,73,144,.1);
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23697077' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-error { color: var(--red-500); font-size: 12px; margin-top: 3px; display: none; }
.form-error.visible { display: block; }

/* ============================================================
   LOADING
   ============================================================ */

.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,.94); z-index: 1000;
  flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.loading-overlay.visible { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--gray-100); border-top-color: var(--brand-blue);
  border-radius: 50%; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay h2 { font-size: 22px; font-weight: 600; color: var(--blue-900); }
.loading-overlay p  { font-size: 14px; color: var(--gray-500); }

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

.report-page { display: none; }
.report-page.visible { display: block; }

/* ── Section chrome ── */
.section-label {
  font-size: 12px; font-weight: 300; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--blue-900); margin-bottom: 10px;
}
.section-title { font-size: 32px; font-weight: 500; color: var(--blue-900); margin-bottom: 30px; line-height: 1.2; }

/* ── SECTION 2: Report Hero ── */
.report-hero {
  padding: 60px var(--px);
  background: linear-gradient(180deg, var(--bronze-bg) 0%, rgba(186,130,90,0) 100%), white;
}
.report-hero.badge-failed { background: linear-gradient(180deg, var(--failed-bg) 0%, rgba(249,47,57,0) 100%), white; }
.report-hero.badge-bronze { background: linear-gradient(180deg, var(--bronze-bg) 0%, rgba(186,130,90,0) 100%), white; }
.report-hero.badge-silver { background: linear-gradient(180deg, var(--silver-bg) 0%, rgba(156,163,175,0) 100%), white; }
.report-hero.badge-gold   { background: linear-gradient(180deg, var(--gold-bg)   0%, rgba(234,179,8,0)   100%), white; }

.hero-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.hero-text  { display: flex; flex-direction: column; gap: 28px; max-width: 640px; }

.hero-meta { font-size: 12px; font-weight: 300; text-transform: uppercase; color: var(--blue-900); letter-spacing: .5px; }

.hero-headline h1 { font-size: 36px; font-weight: 600; color: var(--blue-900); margin-bottom: 10px; line-height: 1.15; }
.hero-headline p  { font-size: 14px; color: var(--blue-900); opacity: .8; max-width: 520px; }

.hero-tags { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-tag  { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue-900); }
.hero-tag svg { color: var(--green-500); }

/* Badge */
.hero-badge-area { display: flex; align-items: center; gap: 40px; flex-shrink: 0; }
.hero-badge-divider { width: 1px; align-self: stretch; background: rgba(110,58,30,.1); }
.badge-content { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.badge-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.badge-label.failed { color: var(--failed-text); }
.badge-label.bronze { color: var(--bronze-text); }
.badge-label.silver { color: var(--silver-text); }
.badge-label.gold   { color: var(--gold-text); }
.badge-svg { width: 120px; height: 120px; }
.badge-desc { font-size: 12px; color: var(--gray-700); text-align: right; max-width: 210px; }

/* ── SECTION 3: Summary ── */
.audit-summary { padding: 50px var(--px) 0; }
.stats-grid    { display: flex; gap: 16px; padding: 0 var(--px); margin-top: 0; margin-bottom: 50px; }

.stat-card {
  flex: 1; padding: 20px; border-radius: var(--card-r);
  border: 1px solid var(--gray-75); background: white;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 160px;
}
.stat-card.errors {
  border: none;
  background: linear-gradient(180deg, rgba(249,47,57,.2) 0%, rgba(249,47,57,0) 185%), white;
}
.stat-card.warnings {
  border: none;
  background: linear-gradient(180deg, rgba(249,87,47,.15) 0%, rgba(249,87,47,0) 185%), white;
}
.stat-header { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-label  { font-size: 20px; font-weight: 400; color: var(--gray-850); }
.stat-label.red    { color: var(--red-600); }
.stat-label.orange { color: var(--orange-500); }
.stat-icon-green { width: 24px; height: 24px; border-radius: 50%; background: var(--green-500); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-value { font-size: 40px; font-weight: 500; color: var(--gray-900); }

/* ── SECTION 4: Category Completeness ── */
.category-section { padding: 0 var(--px) 50px; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.category-card {
  background: white; border: 1px solid var(--gray-50); border-radius: var(--card-r);
  padding: 28px; display: flex; flex-direction: column; gap: 24px;
}
.category-card.red    { box-shadow: 0 0 50px rgba(233,19,30,.10); }
.category-card.orange { box-shadow: 0 0 50px rgba(235,98,0,.06); }
.category-card.green  { box-shadow: 0 0 50px rgba(36,161,72,.14); }

.cat-header { display: flex; justify-content: space-between; align-items: flex-start; }
.cat-name   { font-size: 20px; font-weight: 500; color: var(--gray-900); }
.cat-count  { font-size: 15px; color: var(--gray-500); margin-top: 4px; }
.cat-pct    { font-size: 24px; font-weight: 600; }
.cat-pct.red    { color: var(--red-500); }
.cat-pct.orange { color: var(--orange-500); }
.cat-pct.green  { color: var(--green-600); }

.cat-bar-wrap { display: flex; flex-direction: column; gap: 10px; }
.cat-bar { display: flex; height: 5px; gap: 2px; border-radius: 1px; overflow: hidden; }
.cat-bar-complete { height: 100%; background: var(--green-500); border-radius: 1px; }
.cat-bar-complete.full { background: var(--green-600); }
.cat-bar-missing  { height: 100%; background: var(--gray-100); border-radius: 1px; flex: 1; }

.cat-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 2px; font-size: 13px; width: fit-content; }
.cat-badge.red    { background: var(--red-75);    color: var(--red-500); }
.cat-badge.orange { background: var(--orange-100); color: var(--orange-500); }
.cat-badge.green  { background: var(--green-100);  color: var(--green-650); }

/* ── SECTION 5: Attribute Analysis ── */
.attribute-section { padding: 0 var(--px) 50px; }

.attr-banner {
  background: var(--gray-50); border-radius: 6px;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; font-size: 14px; color: var(--gray-700);
}
.attr-banner .btn-link {
  background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--brand-blue); text-decoration: underline; padding: 0; font-family: inherit;
  white-space: nowrap; flex-shrink: 0; margin-left: 20px;
}

.attr-cards { display: flex; gap: 24px; }

.attr-card {
  flex: 1; background: white; border: 1px solid var(--gray-75);
  border-radius: var(--card-r); padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.attr-card-title { font-size: 18px; font-weight: 500; color: var(--gray-900); }
.attr-card-sub   { font-size: 14px; color: var(--gray-500); }

/* RAG donut circles row */
.rag-row { display: flex; gap: 16px; align-items: flex-start; }
.rag-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rag-donut { width: 72px; height: 72px; transform: rotate(-90deg); }
.rag-donut circle { transition: stroke-dasharray .4s; }
.rag-pct   { font-size: 13px; font-weight: 600; text-align: center; }
.rag-pct.error   { color: var(--red-600); }
.rag-pct.warning { color: var(--orange-500); }
.rag-pct.valid   { color: var(--green-650); }
.rag-name  { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

.attr-improve-banner {
  background: #e8f0fb; border-radius: 4px;
  padding: 8px 12px; font-size: 13px; color: var(--brand-blue); font-weight: 500;
}

/* ── SECTION 6: Product Preview ── */
.product-section { padding: 50px var(--px); background: var(--gray-50); }
.product-info-banner {
  background: white; border: 1px solid var(--gray-75); border-radius: var(--card-r);
  padding: 20px 24px; margin-bottom: 30px; font-size: 14px; color: var(--gray-700);
  line-height: 1.6;
}
.product-info-banner strong { color: var(--gray-900); font-weight: 600; }
.product-link-btn {
  display: inline; background: none; border: none; padding: 0; font-family: inherit;
  font-size: 14px; font-weight: 500; color: var(--brand-blue);
  text-decoration: underline; cursor: pointer; margin-top: 8px;
}

.product-pairs { display: flex; flex-direction: column; gap: 24px; }
.product-pair  { display: flex; gap: 16px; }
.product-card  { flex: 1; border-radius: var(--card-r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }

/* Before card */
.product-card.before { background: var(--gray-50); }
.mono-badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 3px;
  font-family: 'Fira Code', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  width: fit-content;
}
.mono-badge.before { background: var(--gray-100); color: var(--gray-700); }
.mono-badge.after  { background: var(--green-100); color: var(--green-650); }

/* After card */
.product-card.after {
  background: white;
  border: 0.5px solid var(--green-200);
  box-shadow: 0 2px 12px rgba(36,161,72,.08);
}

.product-img-placeholder {
  width: 100%; height: 130px; background: var(--gray-100);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--gray-200); font-size: 32px;
}
.product-img-placeholder.after { background: var(--green-100); color: var(--green-200); }
.product-field { display: flex; flex-direction: column; gap: 2px; }
.product-field-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); font-weight: 500; }
.product-field-value { font-size: 14px; color: var(--gray-850); line-height: 1.4; }
.product-field-value.missing { color: var(--gray-200); font-style: italic; }

.fix-tags { display: flex; flex-direction: column; gap: 5px; }
.fix-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--green-650); font-weight: 500;
}
.fix-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); flex-shrink: 0; }

/* ── SECTION 7: Final Summary ── */
.final-section { padding: 50px var(--px); }

/* Large solution card */
.solution-card {
  background: var(--blue-900); border-radius: var(--card-r);
  padding: 40px; margin-bottom: 30px;
  display: flex; align-items: flex-start; gap: 40px;
}
.solution-card-left { flex: 1; }
.solution-numbers { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 20px; }
.sol-num { display: flex; flex-direction: column; gap: 4px; }
.sol-num-value { font-size: 32px; font-weight: 600; color: white; }
.sol-num-label { font-size: 13px; color: rgba(255,255,255,.6); }
.solution-card p { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.65; max-width: 540px; }

/* Comparison cards */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }

.compare-card { border-radius: var(--card-r); padding: 28px; }
.compare-card.manual { background: var(--gray-50); }
.compare-card.ai     { background: #e8f5ee; }
.compare-heading { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--gray-500); margin-bottom: 8px; font-weight: 500; }
.compare-time { font-size: 28px; font-weight: 600; margin-bottom: 20px; color: var(--gray-900); }
.compare-time.green { color: var(--green-600); }
.compare-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.compare-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--gray-700); }
.compare-list li::before { content: '·'; flex-shrink: 0; color: var(--gray-500); }
.compare-list.green li { color: var(--green-650); }
.compare-list.green li::before { color: var(--green-500); }

/* Hours saved callout */
.hours-callout { text-align: center; padding: 40px 0 30px; }
.hours-num { font-size: 72px; font-weight: 700; color: var(--blue-900); letter-spacing: -2px; }
.hours-label { font-size: 14px; color: var(--gray-500); margin-top: 6px; }

/* 4-step workflow */
.workflow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.workflow-card {
  background: var(--gray-50); border-radius: var(--card-r); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.workflow-step { width: 34px; height: 34px; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--gray-700); }
.workflow-title { font-size: 16px; font-weight: 500; color: var(--gray-900); line-height: 1.3; }
.workflow-desc  { font-size: 13px; color: var(--gray-500); line-height: 1.5; }
.workflow-time  { display: inline-flex; padding: 2px 8px; background: var(--green-100); border-radius: 2px; font-size: 12px; color: var(--green-650); font-weight: 500; width: fit-content; }

/* ── Final CTA banner ── */
.final-cta {
  background: var(--brand-navy); border-radius: var(--card-r);
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.final-cta-text strong { font-size: 18px; font-weight: 600; color: white; display: block; margin-bottom: 4px; }
.final-cta-text span   { font-size: 13px; color: rgba(255,255,255,.65); }
.final-cta-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cta-outline { height: 38px; padding: 0 18px; background: transparent; border: 1px solid rgba(255,255,255,.35); color: white; border-radius: 4px; font-family: inherit; font-size: 14px; cursor: pointer; }
.btn-cta-filled  { height: 38px; padding: 0 18px; background: white; color: var(--brand-blue); border: none; border-radius: 4px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Sticky bottom bar ── */
.bottom-bar {
  position: sticky; bottom: 0; z-index: 100;
  background: var(--brand-navy);
  padding: 12px var(--px);
  display: flex; align-items: center; justify-content: space-between;
}
.bottom-bar-left strong { font-size: 14px; font-weight: 600; color: white; }
.bottom-bar-left span   { font-size: 12px; color: rgba(255,255,255,.6); display: block; margin-top: 1px; }
.bottom-bar-right { display: flex; gap: 8px; }
.bottom-bar .btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,.3); }
.bottom-bar .btn-primary { background: white; color: var(--brand-blue); font-weight: 600; }
