/* ── Variables ──────────────────────────────────────────────── */
:root {
  --navy:       #0a0f1e;
  --accent:     #63b3ed;
  --white:      #ffffff;
  --off-white:  #f8f9fc;
  --light-gray: #eef1f7;
  --mid-gray:   #c8d0e0;
  --text:       #1a1f2e;
  --text-muted: #6b7a99;
  --good:       #1d9e75;
  --warn:       #d97706;
  --bad:        #dc2626;
  --radius:     10px;
  --radius-sm:  6px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--off-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-tagline {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ── Main content ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 32px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--light-gray);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: #1a2744; }
.btn-secondary { background: var(--white); color: var(--navy); border: 1px solid var(--mid-gray); }
.btn-secondary:hover { background: var(--light-gray); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ── Hero (landing page) ────────────────────────────────────── */
.hero {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}
.hero-inner { max-width: 560px; width: 100%; }
.hero-badge {
  display: inline-block;
  background: rgba(99,179,237,0.12);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(99,179,237,0.2);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 36px;
}

/* ── Connect card ───────────────────────────────────────────── */
.connect-card {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 36px;
}
.connect-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}
.input-group { display: flex; gap: 8px; }
.input-group input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.input-group input:focus { border-color: var(--accent); }
.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ── Features list ──────────────────────────────────────────── */
.features { display: flex; flex-direction: column; gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
  width: 24px;
  height: 24px;
  background: rgba(29,158,117,0.1);
  color: var(--good);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.feature strong { display: block; font-size: 14px; color: var(--navy); }
.feature span { font-size: 13px; color: var(--text-muted); }

/* ── Page header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.page-header h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.page-sub { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.back-link {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 6px;
}
.back-link:hover { color: var(--navy); }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-num {
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 12px; color: var(--text-muted); }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.products-table th {
  background: var(--off-white);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mid-gray);
}
.products-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--light-gray);
  vertical-align: middle;
}
.products-table tr:last-child td { border-bottom: none; }
.products-table tr:hover td { background: var(--off-white); }
.product-title {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* ── Score badges ───────────────────────────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
}
.score-good { background: rgba(29,158,117,0.1); color: var(--good); }
.score-warn { background: rgba(217,119,6,0.1);  color: var(--warn); }
.score-bad  { background: rgba(220,38,38,0.1);  color: var(--bad);  }
.score-large {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  padding: 10px 20px;
  border-radius: var(--radius);
}

/* ── Status badges ──────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-pending   { background: var(--light-gray); color: var(--text-muted); }
.status-audited   { background: rgba(99,179,237,0.12); color: #1a6fa8; }
.status-rewritten { background: rgba(217,119,6,0.1); color: var(--warn); }
.status-published { background: rgba(29,158,117,0.1); color: var(--good); }

/* ── Text colors ────────────────────────────────────────────── */
.text-good { color: var(--good); }
.text-warn { color: var(--warn); }
.text-bad  { color: var(--bad);  }
.issues-list { font-size: 12px; color: var(--bad); }

/* ── Paywall banner ─────────────────────────────────────────── */
.paywall-banner {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 8px;
}
.paywall-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.paywall-inner strong { color: var(--white); font-size: 16px; display: block; margin-bottom: 4px; }
.paywall-inner p { color: rgba(255,255,255,0.55); font-size: 14px; }
.paywall-inner .btn-primary { background: var(--accent); color: var(--navy); }
.paywall-inner .btn-primary:hover { background: #90c8f4; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ── Issues panel ───────────────────────────────────────────── */
.issues-panel {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.issues-panel h3 { font-size: 15px; font-weight: 500; color: var(--navy); margin-bottom: 16px; }
.checks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.check-pass { background: rgba(29,158,117,0.06); border: 1px solid rgba(29,158,117,0.15); }
.check-fail { background: rgba(220,38,38,0.04);  border: 1px solid rgba(220,38,38,0.15);  }
.check-icon { font-size: 14px; font-weight: 600; flex-shrink: 0; }
.check-pass .check-icon { color: var(--good); }
.check-fail .check-icon { color: var(--bad);  }
.check-item strong { display: block; color: var(--navy); }
.check-error { font-size: 12px; color: var(--bad); margin-top: 2px; display: block; }

/* ── Generate section ───────────────────────────────────────── */
.generate-section {
  text-align: center;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.generate-hint { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ── Diff section ───────────────────────────────────────────── */
.diff-section {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.diff-section h3 { font-size: 15px; font-weight: 500; color: var(--navy); margin-bottom: 20px; }
.diff-block { margin-bottom: 24px; }
.diff-block:last-of-type { margin-bottom: 0; }
.diff-label { font-size: 12px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.diff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-before, .diff-after {
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
}
.diff-before { background: #fff5f5; border: 1px solid #fecaca; color: #7f1d1d; }
.diff-after  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.diff-tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.6;
}

/* ── Publish section ────────────────────────────────────────── */
.publish-section {
  border-top: 1px solid var(--light-gray);
  padding-top: 20px;
  margin-top: 24px;
  text-align: center;
}
.publish-hint { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* ── Upgrade / paywall page ─────────────────────────────────── */
.upgrade-wrap {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
}
.upgrade-wrap h2 {
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 12px;
}
.upgrade-wrap p { color: var(--text-muted); margin-bottom: 32px; line-height: 1.65; }
.price-card {
  background: var(--white);
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.price-amount {
  font-family: Georgia, serif;
  font-size: 52px;
  color: var(--navy);
  line-height: 1;
}
.price-amount sup { font-size: 24px; vertical-align: super; }
.price-period { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.price-features { list-style: none; text-align: left; margin-bottom: 28px; }
.price-features li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--light-gray);
}
.price-features li:last-child { border-bottom: none; }
.price-features .check { color: var(--good); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-content { padding: 24px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .diff-row { grid-template-columns: 1fr; }
  .checks-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .paywall-inner { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 36px; }
}
