:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 5vw;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  color: var(--text);
}

.brand::before {
  content: "IG";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  color: #fff;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, .14);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links form {
  margin: 0;
}

.nav-links a,
.nav-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 7px;
  color: #334155;
  font-weight: 700;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links button:hover {
  background: #eef2ff;
  color: var(--primary-dark);
}

.hero {
  padding: 74px 5vw 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 42px;
  align-items: center;
  background:
    radial-gradient(circle at 86% 18%, rgba(37, 99, 235, .10), transparent 30%),
    linear-gradient(135deg, #f8fbff, #ffffff 58%, #f6f8fb);
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .98;
  margin: 0 0 20px;
  letter-spacing: 0;
  color: #0f172a;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero p { font-size: 20px; line-height: 1.55; color: #475569; max-width: 760px; }

.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .35fr);
  gap: 18px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.report-hero h1 {
  margin: 0 0 10px;
}

.report-hero p {
  margin-bottom: 0;
  color: var(--muted);
}

.report-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}

.report-total span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.report-total strong {
  margin-top: 8px;
  font-size: 28px;
}

.clean-list {
  margin: 0;
  padding-left: 20px;
  color: #334155;
}

.clean-list li {
  margin: 8px 0;
}

.doc-steps {
  margin: 0;
  padding-left: 22px;
  color: #334155;
}

.doc-steps li {
  margin: 9px 0;
  line-height: 1.5;
}

.doc-image {
  margin: 18px 0;
}

.doc-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.doc-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.provider-doc-section {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.provider-doc-header h2 {
  margin: 4px 0 8px;
}

.provider-doc-header p {
  margin: 0;
  color: var(--muted);
}

.provider-doc-kicker {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.provider-doc-stripe {
  border-left: 5px solid #635bff;
}

.provider-doc-stripe .provider-doc-kicker {
  background: #eef2ff;
  color: #3730a3;
}

.provider-doc-paypal {
  border-left: 5px solid #0070ba;
}

.provider-doc-paypal .provider-doc-kicker {
  background: #e0f2fe;
  color: #075985;
}

.preview {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.preview h2 {
  margin-top: 0;
}

.preview .muted { color: var(--muted); }

.preview hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.preview p {
  border-left: 3px solid #dbeafe;
  padding-left: 12px;
}

.security-note {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 880px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}

.security-note h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.security-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  color: #fff;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, .14);
}

.metric-grid, .cards, .pricing, .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card, .price, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.card h3, .panel h2, .price h3 { margin-top: 0; }
.card h3 {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}
.card h2 { margin-bottom: 0; }
.price.featured { border-color: #93c5fd; box-shadow: var(--shadow); }
.section { padding: 42px 5vw; }

.hero + .section,
#how-it-works,
#pricing {
  padding-top: 34px;
  padding-bottom: 34px;
}
.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 7px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn:hover { background: var(--primary-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--primary); }
.btn.secondary:hover { background: #eff6ff; color: var(--primary-dark); }
.btn.warn { background: var(--warning); border-color: var(--warning); }
.btn.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; color: var(--danger); }

form.inline { display: inline-flex; margin-left: 10px; }

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row form {
  margin: 0;
}

input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 8px 10px;
  margin: 6px 0 14px;
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
  font: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid #bfdbfe;
  border-color: var(--primary);
}

label { font-weight: 800; font-size: 14px; color: #334155; }

.provider-connect-grid {
  display: grid;
  gap: 12px;
}

.provider-connect-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.provider-connect-card:hover {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .10);
}

.provider-connect-card.connected {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.provider-connect-card.connected .provider-card-head span {
  background: #dcfce7;
  color: #166534;
}

.provider-connect-card.provider-stripe {
  border-left: 4px solid #635bff;
}

.provider-connect-card.provider-paypal {
  border-left: 4px solid #0070ba;
}

.provider-connect-card.provider-disabled {
  background: #f8fafc;
  border-color: #cbd5e1;
  border-left-color: #94a3b8;
  color: #64748b;
}

.provider-connect-card.provider-disabled:hover {
  border-color: #cbd5e1;
  box-shadow: none;
}

.provider-connect-card.provider-disabled .provider-card-head span {
  background: #e2e8f0;
  color: #475569;
}

.provider-connect-card.provider-disabled input,
.provider-connect-card.provider-disabled select {
  cursor: not-allowed;
  background: #f1f5f9;
  color: #64748b;
}

.provider-connect-card .button-row form {
  margin: 0;
}

.provider-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.provider-card-head strong {
  font-size: 16px;
}

.provider-card-head span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.provider-connect-card input,
.provider-connect-card select {
  margin: 4px 0 6px;
}

.provider-connect-card button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 13px 14px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-soft); color: #334155; font-size: 13px; text-transform: uppercase; }

.layout { padding: 30px 5vw; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0;
  font-size: 32px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-strip span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.status-strip span:hover {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .10);
}

.status-strip strong {
  color: var(--text);
  margin-right: 4px;
}

.banner {
  padding: 14px 18px;
  background: #ffebf1;
  border: 1px solid #b45309;
  border-radius: 8px;
  margin: 18px 0;
  color: #78350f;
}

.banner.compact {
  background: #fff7ed;
}

.banner.success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--success);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.metric-card.emphasis {
  border-color: #bfdbfe;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-stack,
.main-stack {
  display: grid;
  gap: 16px;
}

.compact-panel {
  padding: 16px;
}

.compact-panel h2 {
  font-size: 18px;
}

.upgrade-panel {
  border-color: #93c5fd;
  background: #eff6ff;
}

.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.section-head a {
  font-size: 14px;
  font-weight: 800;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 24px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.plan-card.featured {
  border-color: #93c5fd;
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.plan-card-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.plan-card-header p {
  margin: 0;
  color: var(--muted);
}

.plan-card-header strong {
  min-width: max-content;
  font-size: 20px;
}

.check-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #334155;
  font-size: 14px;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--success);
  transform: translateY(-1px);
}

.paypal-slot {
  width: 100%;
  min-height: 45px;
}

.paypal-slot iframe {
  max-width: 100% !important;
}

.risk-high { color: var(--danger); font-weight: 900; }
.risk-mid { color: var(--warning); font-weight: 900; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); padding: 12px; border-radius: 8px; }

.table-section {
  padding-top: 24px;
  padding-bottom: 24px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.score-pill,
.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.score-pill.high {
  color: #991b1b;
  background: #fee2e2;
}

.score-pill.mid {
  color: #92400e;
  background: #fef3c7;
}

.status-pill {
  color: #334155;
  background: #f1f5f9;
}

.money {
  font-weight: 900;
  white-space: nowrap;
}

.reason-cell {
  min-width: 280px;
}

details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
  margin-top: 6px;
}

details p {
  margin: 8px 0 0;
  color: var(--muted);
}

.review-form {
  min-width: 150px;
}

.review-form select {
  margin-bottom: 8px;
}

.table-disclosure {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.table-disclosure > summary {
  padding: 16px 18px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 20px;
}

@media (max-width: 860px) {
  .hero, .grid-2, .metric-grid, .cards, .pricing, .stats, .plan-grid, .metric-row, .workspace-grid { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav-links { justify-content: flex-start; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .status-strip { justify-content: flex-start; }
  .report-hero { grid-template-columns: 1fr; }
  .report-total { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 18px; }
}
