/* ReviewSplit — premium SaaS design system
 * Palette: deep ink navy #0A0F1E · indigo accent #4F46E5 · off-white surfaces
 * Verdicts: Split Risk crimson · Shared emerald · Grey amber
 */
:root {
  --ink: #0a0f1e;
  --ink-2: #232c42;
  --muted: #5b6a85;
  --faint: #8593ab;
  --line: #e4e8f0;
  --line-2: #eef1f6;
  --bg: #f6f7fa;
  --card: #ffffff;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef0fe;
  --split: #b3273d;
  --split-soft: #fceef0;
  --shared: #0c7a57;
  --shared-soft: #e6f4ee;
  --grey: #96690a;
  --grey-soft: #fbf2dc;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 15, 30, .05), 0 1px 3px rgba(10, 15, 30, .04);
  --shadow-md: 0 4px 16px rgba(10, 15, 30, .07), 0 1px 3px rgba(10, 15, 30, .05);
  --shadow-lg: 0 12px 32px rgba(10, 15, 30, .10), 0 2px 6px rgba(10, 15, 30, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: #fff; }
.topbar-in { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-height: 44px; }
.mark { flex: none; display: block; }
.wordmark { font-size: 21px; font-weight: 750; letter-spacing: -0.02em; }
.wordmark em { font-style: normal; color: #a5abff; }
.tagline { color: #97a3bd; font-size: 13px; letter-spacing: .01em; }

main.wrap { padding-top: 40px; padding-bottom: 56px; }

/* ---------- hero ---------- */
.hero { max-width: 780px; }
.eyebrow {
  margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  font-size: 38px; line-height: 1.16; letter-spacing: -0.025em; font-weight: 780;
  margin: 0 0 16px; color: var(--ink);
}
.lede { color: var(--ink-2); font-size: 16.5px; margin: 0 0 12px; }
.lede strong { color: var(--ink); }
.privacy {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--shared-soft); border: 1px solid #c4e2d4; border-radius: 12px;
  padding: 12px 16px; margin: 20px 0 0; font-size: 14.5px; color: #134e3a;
}
.privacy .lock { line-height: 1.4; }

/* ---------- upload ---------- */
.upload-card {
  margin-top: 28px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-md); padding: 22px;
}
.dropzone {
  border: 2px dashed #c3cbdd; border-radius: var(--radius);
  background: #fbfcfe; padding: 40px 24px 34px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.dropzone:hover { border-color: #9aa6c4; }
.dropzone:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dropzone.busy { pointer-events: none; opacity: .75; }
.dz-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.dz-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.dz-sub { color: var(--muted); margin: 0; font-size: 14.5px; }
.dz-formats { color: var(--faint); margin: 10px 0 0; font-size: 12.5px; letter-spacing: .08em; font-weight: 600; }
.dz-status { color: var(--accent); font-weight: 600; margin: 12px 0 0; font-size: 14.5px; }
.demo-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 0 4px;
}
.demo-label { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.demo-note { color: var(--muted); font-size: 13.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 11px;
  font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: var(--card); color: var(--ink-2); border-color: var(--line); }
.btn-outline:hover { border-color: #c3cbdd; background: #fbfcfe; }
.btn-ghost { background: var(--accent-soft); color: var(--accent-dark); }
.btn-ghost:hover { background: #e2e5fd; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- error / notices ---------- */
.error {
  background: var(--split-soft); border: 1px solid #f0c3ca; color: #7e1c2c;
  border-radius: 12px; padding: 13px 16px; margin-top: 18px; font-size: 14.5px;
}

/* ---------- results ---------- */
.results-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 40px;
}
.results-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; font-weight: 750; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.summary {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 20px 0 4px;
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-sm); padding: 16px 16px 13px;
}
.stat .num {
  display: block; font-size: 30px; font-weight: 780; letter-spacing: -0.02em;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat .lbl {
  display: block; margin-top: 5px; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.stat.split .num { color: var(--split); }
.stat.shared .num { color: var(--shared); }
.stat.grey .num { color: var(--grey); }
.warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #eedcae; color: #6d5410;
  border-radius: 12px; padding: 12px 16px; margin: 12px 0 0; font-size: 14.5px;
}
.warn::before { content: "⚠"; flex: none; color: var(--grey); font-size: 15px; line-height: 1.45; }

/* ---------- filter chips ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 4px; }
.fchip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2);
  font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.fchip:hover { border-color: #c3cbdd; }
.fchip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fchip .cnt { font-variant-numeric: tabular-nums; color: var(--faint); font-weight: 700; }
.fchip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip.active .cnt { color: #b9c2d8; }
.fchip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fchip .dot.split { background: var(--split); }
.fchip .dot.shared { background: var(--shared); }
.fchip .dot.grey { background: var(--grey); }
.no-match {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--muted); font-size: 14.5px; text-align: center; margin-top: 14px;
}

/* ---------- family cards ---------- */
.family {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin: 14px 0 0; overflow: hidden;
}
.family > summary {
  list-style: none; cursor: pointer; padding: 18px 20px; min-height: 44px;
  display: block; position: relative;
}
.family > summary::-webkit-details-marker { display: none; }
.family > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.frow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-right: 26px; }
.fname { font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; }
.chev {
  position: absolute; right: 18px; top: 20px; color: var(--faint);
  font-size: 13px; transition: transform .18s ease;
}
.family[open ] .chev { transform: rotate(180deg); }
.fmeta { color: var(--muted); font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.dimchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dchip {
  font-size: 12px; font-weight: 650; padding: 3.5px 10px; border-radius: 999px;
  background: #f1f3f8; color: var(--ink-2); white-space: nowrap;
}
.dchip.functional { background: var(--split-soft); color: var(--split); }
.dchip.minor { background: var(--shared-soft); color: var(--shared); }
.dchip.grey { background: var(--grey-soft); color: var(--grey); }
.chip {
  font-size: 11.5px; font-weight: 800; letter-spacing: .07em; padding: 4.5px 11px;
  border-radius: 999px; white-space: nowrap; text-transform: uppercase;
}
.chip.split { background: var(--split-soft); color: var(--split); }
.chip.shared { background: var(--shared-soft); color: var(--shared); }
.chip.grey { background: var(--grey-soft); color: var(--grey); }
.fbody { padding: 2px 20px 20px; border-top: 1px solid var(--line-2); }
.fbody h3 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--faint); font-weight: 750; margin: 20px 0 8px;
}
.headline { font-size: 15.5px; color: var(--ink-2); margin: 14px 0 0; }
.flag {
  display: flex; gap: 8px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #eedcae; color: #6d5410;
  border-radius: 10px; padding: 9px 13px; font-size: 14px; margin: 10px 0 0;
}
.flag::before { content: "⚠"; flex: none; color: var(--grey); line-height: 1.5; }
.drivers { list-style: none; margin: 0; padding: 0; }
.drivers li { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink-2); }
.drivers li:last-child { border-bottom: 0; }
.drivers .dwhy { color: var(--muted); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; }
thead th {
  background: #f8f9fc; color: var(--muted); font-size: 11.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr + tr td { border-top: 1px solid var(--line-2); }
td.asin, td.sku { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }

/* ---------- playbook steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 4px 0 14px 46px; font-size: 14.5px; color: var(--ink-2);
}
.steps li:last-child { padding-bottom: 2px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 14px; font-weight: 750; display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.steps p { margin: 0; }

/* ---------- standalones ---------- */
.standalones-card .fbody { border-top: 0; padding-top: 4px; }
.standalones-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.standalones-card li { padding: 2.5px 0; }

/* ---------- footer ---------- */
footer {
  color: var(--muted); font-size: 13px; margin-top: 44px;
  border-top: 1px solid var(--line); padding-top: 18px; max-width: 780px;
}
footer strong { color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 28px; }
  .hero h1 { font-size: 28px; }
  .lede { font-size: 15.5px; }
  .topbar-in { gap: 8px 14px; }
  .tagline { font-size: 12px; }
  .upload-card { padding: 14px; border-radius: 18px; }
  .dropzone { padding: 30px 16px 26px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .stat .num { font-size: 26px; }
  .results-head { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .family > summary { padding: 16px; }
  .fbody { padding: 2px 16px 18px; }
  .chev { right: 14px; top: 18px; }
  th, td { padding: 8px 10px; }
}
