:root {
  --bg: #0c111d;
  --surface: #131c2e;
  --surface-2: #19253c;
  --border: #273756;
  --text: #eef2ff;
  --muted: #9aa8c7;
  --accent: #38bdf8;
  --gold-1: #f59e0b;
  --gold-2: #fbbf24;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 16px; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px;
}
.back-link {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.back-link:hover { color: var(--accent); }
.brand h1 { margin: 0; font-size: 1.25rem; }
.brand p { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.controls-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.segmented { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.segmented button {
  background: transparent; color: var(--muted); border: 0; padding: 6px 11px;
  border-radius: 6px; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.segmented button.active { background: var(--accent); color: #031524; }
.btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: 0.84rem; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); color: #031524; border-color: var(--accent); }
.btn-pro {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #1c1002;
  border: 1px solid #fcd34d;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.28);
}
.btn-pro:hover {
  filter: brightness(1.06);
  border-color: #fde68a;
  color: #1c1002;
}
.btn-ghost { background: transparent; color: var(--muted); }
.btn-sm { padding: 5px 9px; font-size: 0.78rem; }
.grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; align-items: start; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.panel h2 { margin: 0 0 10px; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.field { margin-bottom: 11px; }
.field label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
input[type="text"], textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px; font-size: 0.9rem; font-family: inherit;
}
textarea { resize: vertical; }
.score-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.score-ring {
  width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 800; border: 3px solid var(--accent); background: var(--bg); flex-shrink: 0;
}
.score-ring.good { border-color: var(--good); color: var(--good); }
.score-ring.warn { border-color: var(--warn); color: var(--warn); }
.score-ring.bad { border-color: var(--bad); color: var(--bad); }
.serp-box {
  background: #ffffff; color: #1f2937; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.serp-url { font-size: 0.76rem; color: #4b5563; }
.serp-title { font-size: 1rem; color: #1a0dab; font-weight: 600; margin: 2px 0; }
.serp-desc { font-size: 0.83rem; color: #374151; }
.mobile-card {
  max-width: 320px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.mobile-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-pill {
  font-size: 0.76rem; padding: 4px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
}
.tag-pill.over { border-color: var(--bad); color: #fca5a5; }
.checks-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.chk { font-size: 0.83rem; padding: 8px 10px; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--border); }
.chk.pass { border-left-color: var(--good); }
.chk.warn { border-left-color: var(--warn); }
.chk.fail { border-left-color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upsell-bar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--surface));
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.upsell-bar p { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); }
.footer { margin-top: 16px; font-size: 0.76rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 8, 18, 0.78); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 520px; width: 100%; padding: 20px; max-height: 92vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.plan-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.plan-box h4 { margin: 0; font-size: 0.92rem; }
.plan-featured {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), var(--bg));
}
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.plan-desc { margin: 0; font-size: 0.8rem; color: var(--muted); }
.badge-pro {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  flex-shrink: 0;
}
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-methods-note {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}
.unlock-row { display: flex; gap: 8px; margin-top: 10px; }
.toast { position: fixed; bottom: 18px; right: 18px; max-width: 360px; background: var(--surface-2); border: 1px solid var(--accent); padding: 10px 14px; border-radius: 10px; font-size: 0.84rem; display: none; z-index: 60; }
.toast.show { display: block; }
.hidden { display: none !important; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

/* --- Cross-link banner (configurable in src/config/checkout.js) --- */
.cross-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.07));
}
.cross-link strong { display: block; font-size: 0.9rem; }
.cross-link span { font-size: 0.8rem; color: var(--muted); }
.cross-link a.btn { text-decoration: none; }
