/* ============================================================
   SiteScore design system v2
   Chrome:  warm paper / near-black ink / hairline borders
   Type:    Source Serif 4 (display) · Source Sans 3 (body)
            · JetBrains Mono (data)
   Color:   monochrome UI, semantic score colors only
   ============================================================ */
:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #16161a;
  --ink-2: #4b4b52;
  --muted: #8b8b93;
  --line: #e5e5e1;
  --line-strong: #d4d4cf;

  --good: #178a52;
  --avg: #b7791f;
  --bad: #c23b2e;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 22, 26, .04), 0 1px 3px rgba(22, 22, 26, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 20px 20px 64px; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 960px; margin: 0 auto; padding: 22px 20px 4px;
}
.brand { font-family: var(--font-sans); font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--muted); }
.tagline { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.toplink { font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.toplink:hover { border-color: var(--ink); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.005em; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.subhead { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 20px 0 10px; color: var(--ink-2); }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.fine.center { text-align: center; margin-top: 26px; }
.tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.mono { font-family: var(--font-mono); font-size: 11.5px; }
code { font-family: var(--font-mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }

/* ---------- landing ---------- */
.landgrid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; padding: 48px 0 12px; }
.kicker { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.landcopy h1 { font-size: 42px; margin-bottom: 14px; }
.landcopy h1 em { font-style: italic; }
.landcopy .sub { font-size: 16.5px; color: var(--ink-2); max-width: 46ch; }
.checks { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 22px; }
.checks span { font-size: 13px; color: var(--ink-2); }
.checks span::before { content: "✓ "; color: var(--good); font-weight: 700; }

.landform {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; position: sticky; top: 20px;
}
.landform label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.row { display: flex; gap: 8px; }
.row input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 15px; font-family: var(--font-sans);
  border: 1.5px solid var(--line-strong); border-radius: 8px; outline: none; background: #fff; color: var(--ink);
  transition: border-color .12s;
}
.row input:focus { border-color: var(--ink); }
.row input::placeholder { color: #b3b3b8; }
button, .btn {
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; letter-spacing: .005em;
  padding: 12px 18px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--ink); color: #fff; white-space: nowrap; text-decoration: none; display: inline-block;
  transition: background .12s;
}
button:hover, .btn:hover { background: #000; }
button:disabled { opacity: .55; cursor: wait; }
.btn.light { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.light:hover { background: var(--bg); }
.err { color: var(--bad); margin-top: 12px; font-size: 13.5px; font-weight: 600; }

.loading { margin-top: 18px; text-align: center; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.loading p { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.spinner { width: 26px; height: 26px; margin: 0 auto; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }

.how { padding: 34px 28px; }
.howlist { list-style: none; display: grid; gap: 22px; }
.howlist li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.howlist .n { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.howlist h3 { margin-bottom: 3px; }
.howlist p { font-size: 14.5px; color: var(--ink-2); max-width: 56ch; }

/* ---------- report hero ---------- */
.hero.inf { display: grid; grid-template-columns: auto auto 1fr; gap: 36px; align-items: center; padding: 34px 0 8px; }
.scorecol { text-align: center; }
.dial {
  width: 150px; height: 150px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--col) calc(var(--p) * 1%), var(--line) 0);
  display: flex; align-items: center; justify-content: center;
}
.dial::after { content: ""; position: absolute; inset: 11px; background: var(--surface); border-radius: 50%; }
.dial span { position: relative; z-index: 1; font-family: var(--font-display); font-size: 47px; font-weight: 600; letter-spacing: -.02em; }
.grade { font-size: 26px; font-weight: 700; margin-top: 6px; }
.gradelabel { color: var(--muted); font-size: 13px; }

.radarcol { flex-shrink: 0; }
.radar { width: 235px; height: 235px; }
.radar .rg { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .rf { fill: rgba(22, 22, 26, .09); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.radar .rl { font-size: 11px; fill: var(--muted); font-family: var(--font-sans); font-weight: 600; }

.factcol { min-width: 0; }
.factcol h1 { font-size: 26px; }
.factcol .domain { font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
.factcol .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.warn { background: #fdf3f1; border: 1px solid #f0d6d2; color: var(--bad); font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 8px 12px; margin-top: 12px; }

.quik { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quik div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; text-align: center; min-width: 82px; }
.quik b { display: block; font-family: var(--font-mono); font-size: 16px; font-weight: 500; color: var(--ink); }
.quik span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.note { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-top: 16px; }
.note.success { background: #edf7f1; color: var(--good); border: 1px solid #d4ecdd; }

/* ---------- optional email banner ---------- */
.banner { display: flex; flex-direction: column; gap: 12px; }
.bannerrow { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bannercopy { flex: 1; min-width: 260px; }
.banner h2 { font-size: 16px; margin-bottom: 3px; }
.banner p { color: var(--ink-2); font-size: 14px; margin: 0; }
.bannerform { flex: 1.4; min-width: 300px; }
.banner .row { margin: 0; max-width: 440px; }
.dismiss { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.dismiss:hover { color: var(--ink); }

/* ---------- readiness gauges ---------- */
.gaugegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 14px; }
.gaugecell { text-align: center; }
.gaugecell b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 8px; }
.gaugecell .fine { display: block; margin-top: 2px; min-height: 30px; font-size: 11.5px; }
.gauge {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; position: relative;
  background: conic-gradient(var(--col) calc(var(--p) * 1%), var(--line) 0);
  display: inline-flex; align-items: center; justify-content: center;
}
.gauge::after { content: ""; position: absolute; inset: 8px; background: var(--surface); border-radius: 50%; }
.gauge span { position: relative; z-index: 1; font-family: var(--font-display); font-size: 21px; font-weight: 600; }

/* ---------- summary columns ---------- */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.colbox { border-radius: var(--radius); padding: 18px 20px; }
.colbox.good { background: #f2f8f4; border: 1px solid #dcebe2; }
.colbox.bad { background: #fdf6f5; border: 1px solid #f0deda; }
.colbox.neut { background: var(--surface); border: 1px solid var(--line); }
.colbox h4 { margin-bottom: 10px; }
.colbox li { font-size: 13.5px; margin: 5px 0; padding-left: 14px; position: relative; }
.colbox li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* ---------- business snapshot ---------- */
.snapchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.snapchips span { background: var(--bg); border: 1px solid var(--line); font-size: 13px; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); }
.snapchips .social { background: #f2f8f4; border-color: #dcebe2; color: var(--good); }
.gbp { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.gbpmain { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.gbpmain b { font-size: 15px; }
.star { color: var(--avg); font-weight: 700; font-size: 13px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.pill small { color: var(--muted); font-weight: 500; }
.pill.green { background: #f2f8f4; border-color: #dcebe2; color: var(--good); }
.pill.purple { background: #f4f2fa; border-color: #e3def0; color: #4b3f72; }
.pill.amber { background: #faf6ee; border-color: #efe4cf; color: var(--avg); }

/* ---------- meters + chips ---------- */
.meters { display: grid; gap: 13px; margin-bottom: 18px; }
.meter .cathead { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.meter .cathead b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.bar { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; }

.issuechips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.issuechips span { background: #f2f8f4; color: var(--good); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.issuechips .chipbad { background: #fdf6f5; color: var(--bad); }

.cwv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
.cwvitem { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.shotwrap { margin-top: 14px; }
.shot { display: block; max-width: 340px; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.shotwrap figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.cwvitem b { font-size: 13.5px; }
.cwvitem p { font-size: 13px; color: var(--ink-2); }
.cwvitem small { text-transform: capitalize; font-family: var(--font-mono); font-size: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--line); }
.dot.good { background: var(--good); }
.dot.avg { background: var(--avg); }
.dot.bad { background: var(--bad); }

/* ---------- checklist ---------- */
.chk { display: grid; gap: 5px; }
.chk div { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14.5px; font-weight: 600; }
.chk div > span { font-weight: 700; width: 14px; text-align: center; }
.chk small { color: var(--muted); font-weight: 500; margin-left: auto; text-align: right; font-size: 12.5px; }
.chk .ok { background: #f2f8f4; }
.chk .ok > span { color: var(--good); }
.chk .no { background: #fdf6f5; }
.chk .no > span { color: var(--bad); }
.chk .warn { background: #faf6ee; }
.chk .warn > span { color: var(--avg); }

/* ---------- service + competitor cards ---------- */
.svcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svccard { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; }
.svchead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.svchead b { font-size: 13.5px; font-weight: 600; }
.svcmeta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin: 6px 0; }
.svcmeta span { font-family: var(--font-mono); font-size: 11.5px; }

/* ---------- opportunities ---------- */
.fixes { list-style: none; counter-reset: fix; display: grid; gap: 16px; }
.fixes li { counter-increment: fix; position: relative; padding-left: 40px; }
.fixes li::before {
  content: counter(fix, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.fixhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fixhead b { font-size: 15px; }
.metatags { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.impact { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.fix { font-size: 14px; margin-top: 2px; }
.badge { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 5px; }
.b-high { background: #fdf6f5; color: var(--bad); border: 1px solid #f0deda; }
.b-med { background: #faf6ee; color: var(--avg); border: 1px solid #efe4cf; }
.b-low { background: #f2f8f4; color: var(--good); border: 1px solid #dcebe2; }

/* ---------- gated ---------- */
.gated { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 16px 18px; }
.gated p { font-size: 14px; margin: 3px 0; }
.gatednote { background: var(--bg); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); }
.gatednote strong { color: var(--ink); }

/* ---------- CTA ---------- */
.cta { border: 1px solid var(--line); }
.big { font-size: 16.5px; margin-bottom: 8px; }
.ctabox { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px; margin-top: 16px; }
.ctabox h3 { font-size: 18px; margin-bottom: 12px; color: #fff; }
.ctabox .ctakicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9b9ba2; margin-bottom: 8px; }
.ctabox ul { margin: 0 0 18px 18px; font-size: 14.5px; color: #e8e8ea; }
.ctabox li { margin: 5px 0; }
.ctabox .btn { background: #fff; color: var(--ink); }
.ctabox .btn:hover { background: #e8e8ea; }

/* ---------- details / tables ---------- */
.dets { margin-top: 20px; }
.dets summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.dets summary:hover { border-color: var(--line-strong); }
.dets .card { margin-top: 10px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.inv { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
table.inv th { text-align: left; background: var(--bg); padding: 8px 10px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
table.inv td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.inv tr:hover td { background: #fafaf8; }
.issue { color: var(--bad); }
.kvtable { display: grid; gap: 0; }
.kvtable div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kvtable span { font-size: 13px; color: var(--muted); }
.kvtable b { font-size: 13px; text-align: right; font-weight: 600; }
.lims { margin: 4px 0 0 18px; }
.lims li { font-size: 13px; color: var(--ink-2); margin: 4px 0; }
.snap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.snap div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-align: center; }
.snap b { display: block; font-family: var(--font-mono); font-size: 17px; font-weight: 500; }
.snap span { font-size: 11.5px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .landgrid { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .landcopy h1 { font-size: 32px; }
  .landform { position: static; }
  .hero.inf { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .factcol { text-align: left; }
  .radarcol { justify-self: center; }
  .scorecol { justify-self: center; }
  .cols3 { grid-template-columns: 1fr; }
  .cwv { grid-template-columns: 1fr; }
  .kvtable div { flex-direction: column; gap: 2px; }
  .kvtable b { text-align: left; }
  .gbpmain { flex-direction: column; align-items: flex-start; }
  .row { flex-direction: column; }
}
