/* Product Radar - dark, high contrast, big targets. Plain words over jargon. */
:root {
  --bg: #0b0d10;
  --panel: #14181d;
  --panel-2: #1b2027;
  --line: #262d36;
  --line-soft: #1e242b;
  --text: #eef2f6;
  --muted: #94a3b2;
  --dim: #64707e;
  --accent: #c6f24e;
  --accent-ink: #10160a;
  --good: #4ade80;
  --ok: #c6f24e;
  --warn: #fbbf24;
  --bad: #f87171;
  --blue: #60a5fa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- shell ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px;
  background: rgba(11,13,16,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.tabs { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.tab {
  background: none; border: 0; cursor: pointer;
  padding: 9px 15px; border-radius: 10px;
  color: var(--muted); font-weight: 650; font-size: 14.5px;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.on { background: var(--accent); color: var(--accent-ink); }
.top .spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
  padding: 11px 18px; border-radius: 11px; font-weight: 650;
}
.btn:hover { border-color: #3a444f; background: #212832; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 14px 26px; font-size: 16px; border-radius: 13px; }
.btn.ghost { background: none; }
.btn.danger { color: var(--bad); border-color: #40282c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.wrap { max-width: 1380px; margin: 0 auto; padding: 22px 20px 80px; }
.page { display: none; }
.page.on { display: block; }

h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 20px; max-width: 74ch; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 25px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- filters ---------- */
.filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--dim); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.field select, .field input {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-width: 130px; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field.grow { flex: 1; min-width: 200px; }
.field.grow input { width: 100%; }

.seg { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { background: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 650; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: border-color .12s, transform .12s;
}
.card:hover { border-color: #3d4650; transform: translateY(-2px); }
/* The image must be OUT of flow. In flow, a tall photo's intrinsic height beats
   aspect-ratio and stretches the card - 1333x1999 shots made 557px-tall cards. */
.card .shot { position: relative; aspect-ratio: 1; background: #0f1317; overflow: hidden; }
.card .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 12px; }
.score-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(8,10,13,.86); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 5px 10px; display: flex; align-items: baseline; gap: 6px;
}
.score-badge b { font-size: 19px; letter-spacing: -.02em; }
.score-badge span { font-size: 11px; color: var(--muted); }
.pill {
  position: absolute; top: 10px; right: 10px;
  border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 750;
  background: rgba(8,10,13,.86); backdrop-filter: blur(6px); border: 1px solid var(--line);
}
.pill.hot { background: #c6f24e; color: #10160a; border-color: #c6f24e; }
.pill.risk { background: #3a1d21; color: #ffb4b4; border-color: #5a2a30; }
.card .body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .name { font-weight: 650; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: auto; }
.card .price { font-weight: 750; font-size: 16px; }

.bar { height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }

.s-strong { color: var(--good); }
.s-good { color: var(--ok); }
.s-mid { color: var(--warn); }
.s-low { color: var(--dim); }
.bg-strong { background: var(--good); }
.bg-good { background: var(--ok); }
.bg-mid { background: var(--warn); }
.bg-low { background: #3c4753; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%);
  background: var(--bg); border-left: 1px solid var(--line); z-index: 61;
  overflow-y: auto; box-shadow: var(--shadow);
}
.drawer-head { position: sticky; top: 0; background: rgba(11,13,16,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 12px; align-items: center; z-index: 2; }
.drawer-head h2 { margin: 0; flex: 1; font-size: 16px; }
.drawer-body { padding: 20px; display: flex; flex-direction: column; gap: 22px; }
.hero-row { display: flex; gap: 16px; }
.hero-row img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; background: #0f1317; }

.block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.block h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.sig { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.sig .lab { font-size: 13.5px; }
.sig .val { font-weight: 700; font-size: 13.5px; min-width: 34px; text-align: right; }
.sig .track { grid-column: 1 / -1; margin-top: -4px; }
.unknown { color: var(--dim); font-style: italic; }

table.rows { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.rows th { text-align: left; color: var(--dim); font-weight: 650; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 8px 0; }
table.rows td { padding: 9px 10px 9px 0; border-top: 1px solid var(--line-soft); vertical-align: top; }
table.rows tr:hover td { background: #11151a; }

.flag { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.flag:first-of-type { border-top: 0; }
.flag .sev { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.flag .sev.high { background: var(--bad); }
.flag .sev.medium { background: var(--warn); }
.flag b { font-size: 13.5px; }
.flag p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13px; }
.chip:hover { border-color: var(--accent); }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.calc .inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc .inputs .wide { grid-column: 1 / -1; }
.money-in { position: relative; }
.money-in span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.money-in input { padding-left: 26px; width: 100%; }
.result-big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.result-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.result-row span { color: var(--muted); }
.result-row b { font-variant-numeric: tabular-nums; }
.verdict { border-radius: 12px; padding: 14px 16px; font-weight: 650; }
.verdict.good { background: #16301f; color: #86efac; border: 1px solid #24512f; }
.verdict.bad { background: #33191c; color: #fca5a5; border: 1px solid #542329; }

/* ---------- stores ---------- */
.store-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.store-row .dotstat { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dotstat.ok { background: var(--good); }
.dotstat.blocked, .dotstat.error { background: var(--bad); }
.dotstat.new { background: var(--dim); }
.store-row .who { flex: 1; min-width: 0; }
.store-row .who b { display: block; font-size: 14.5px; }
.store-row .who span { color: var(--muted); font-size: 12.5px; }
.store-row .nums { display: flex; gap: 20px; text-align: right; }
.store-row .nums div b { display: block; font-size: 15px; }
.store-row .nums div span { color: var(--dim); font-size: 11px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-size: 18px; color: var(--text); margin-bottom: 8px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 20px; z-index: 90; box-shadow: var(--shadow); font-weight: 650;
}
.progress { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.note { color: var(--dim); font-size: 12.5px; line-height: 1.5; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .tabs { order: 3; width: 100%; }
}
@media (max-width: 620px) {
  .calc .inputs { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .hero-row img { width: 96px; height: 96px; }
}

/* must win over any display: rule above */
[hidden] { display: none !important; }

/* ---------- account, plan, billing ---------- */
.acct-chip { display: flex; align-items: center; gap: 8px; }
.planTag {
  border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.planTag.trial { background: var(--accent); color: var(--accent-ink); }
.planTag.paid { background: #1d3a26; color: #86efac; border: 1px solid #24512f; }
.planTag.free { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }

.plan-banner {
  background: #2a2410; border-bottom: 1px solid #4a3d15; color: #fde68a;
  padding: 11px 20px; font-size: 14px; text-align: center;
}
.plan-banner a { color: #fde68a; text-decoration: underline; }

.price-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.price-row:first-child { border-top: 0; }
.price-row.on { background: #11161a; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 10px; }

@media (max-width: 900px) {
  .acct-chip .note { display: none; }
}

/* Best-seller proof: the strongest claim on the card, so it gets the accent. */
.pill.sell { background: #16301f; color: #86efac; border-color: #24512f; }

/* ---------- onboarding ---------- */
.ob-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 80; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.ob-card { width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.ob-card h2 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.02em; }
.ob-card .sub { margin-bottom: 20px; }
.ob-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.ob-steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.ob-steps i.on { background: var(--accent); }
.niche-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 20px; }
.niche {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
  font-weight: 600; font-size: 14.5px;
}
.niche:hover { border-color: #3d4650; }
.niche.on { border-color: var(--accent); background: #1a2113; }
.niche .n { margin-left: auto; color: var(--dim); font-size: 12px; font-weight: 500; }
.ob-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.ob-actions .spacer { flex: 1; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.check-row .dotstat { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.check-row .who { flex: 1; min-width: 0; }
