/* ===========================================================
   Grader — UI/UX study modeled on grader.owner.com
   Palette + type scale sampled from the live site.
   =========================================================== */

:root {
  /* surfaces */
  --bg:            #fbf8f5;
  --surface:       #ffffff;
  --surface-sub:   #f3f3f3;
  --surface-field: #e9e9e9;

  /* ink */
  --ink:           #010100;
  --ink-2:         #3a3633;
  --ink-3:         #6b6560;
  --ink-4:         #7a7168;
  --hairline:      rgba(9, 10, 11, 0.08);

  /* brand */
  --green-900:     #102215;
  --green-800:     #1d431a;
  --green-700:     #174c1a;
  --green-500:     #3d7a22;
  --green-200:     #d1ebb9;
  --green-100:     #e8f3dc;
  --green-chip:    #bbdb99;

  /* status */
  --red-700:       #b13d3d;
  --red-500:       #d65353;
  --red-100:       #fae8e8;
  --red-50:        #f7e6e6;
  --amber-600:     #8a5d14;
  --amber-100:     #f6e3b4;
  --warm-100:      #edeae7;

  /* spacing — 4px base. Replaces 61 distinct raw px values. */
  --space-1:  4px;   --space-2:  8px;   --space-3: 12px;
  --space-4: 16px;   --space-5: 20px;   --space-6: 24px;
  --space-7: 32px;   --space-8: 40px;   --space-9: 48px;

  /* type ramp — replaces 25 ad-hoc font sizes */
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  21px;
  --text-3xl:  23px;
  --text-display: 46px;

  /* motion */
  --dur-fast: .18s;
  --dur-base: .3s;
  --dur-slow: .5s;

  /* geometry */
  --r-card:        16px;
  --r-lg:          24px;
  --r-pill:        9999px;
  --shadow-card:   0 1px 2px rgba(9,10,11,.04), 0 8px 24px rgba(9,10,11,.05);
  --shadow-pop:    0 12px 40px rgba(9,10,11,.14);
  --shadow-modal:  0 24px 70px rgba(9,10,11,.18);

  --ease:          cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Suisse Intl", "Helvetica Neue", Inter, system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* Visible keyboard focus. Previously the UI relied entirely on the browser
   default and removed it outright on the search input, leaving keyboard
   users with no indicator on the primary control. */
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--green-800);
  outline-offset: 2px;
  border-radius: 4px;
}
.field:focus-within { outline: 2px solid var(--green-800); outline-offset: 2px; }
input  { font: inherit; }
a { color: inherit; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- top bar ---------------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar { gap: 12px; }
.logo { min-width: 0; flex-shrink: 1; }
.logo-img, .logo svg { max-width: 100%; }
@media (max-width: 560px) {
  .topbar { padding: 14px 16px; }
  .logo-img { height: 26px; }
  .btn-pdf span { display: none; }
  .btn-pdf, .btn-login { padding: 8px 14px; font-size: 14px; }
}
.topbar.is-hidden { opacity: 0; visibility: hidden; transition: opacity .3s; }

.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo svg { display: block; }
.logo span {
  font-size: 26px; font-weight: 500; letter-spacing: -.03em;
}

.btn-login {
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 9px 20px;
  font-size: 15px; font-weight: 500;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn-login:hover { background: #fff; transform: translateY(-1px); }

/* ---------------- stage machinery ---------------- */

.stage { display: none; }
.stage.is-active { display: block; }

/* =========================================================
   STAGE 1 — search
   ========================================================= */

.search-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 24px 120px;
}

.search-inner {
  width: 100%;
  max-width: 668px;
  text-align: center;
  animation: rise .5s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 500;
  text-wrap: balance;
}
.hero-sub {
  margin: 0 0 30px;
  font-size: 16px;
  color: var(--ink-3);
  text-wrap: balance;
}

/* the field is a tall rounded slab with the caret parked top-left
   and the submit button pinned bottom-right — like a chat composer */
.field {
  position: relative;
  background: var(--surface-field);
  border-radius: var(--r-lg);
  padding: 18px 22px 46px;
  text-align: left;
  transition: box-shadow .2s var(--ease), background .2s var(--ease);
}
.field:focus-within {
  background: #ececec;
  box-shadow: 0 0 0 3px rgba(29,67,26,.10);
}

.field input {
  width: 100%;
  border: 0; outline: 0; background: none;
  font-size: 16px; color: var(--ink);
}
.field input::placeholder { color: var(--ink-3); }

.field-submit {
  position: absolute; right: 14px; bottom: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--green-800);
  color: #fff;
  transition: transform .18s var(--ease), background .18s var(--ease), opacity .18s;
}
.field-submit:hover { background: var(--green-900); transform: translateY(-1px); }
.field-submit:disabled { opacity: .45; cursor: default; transform: none; }

/* autocomplete — opens UPWARD, sitting above the field */
.ac {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 8px);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden auto;
  max-height: min(330px, calc(100vh - 220px));
  overscroll-behavior: contain;
  display: none;
  animation: acIn .16s var(--ease) both;
}
.ac.is-open { display: block; }
@keyframes acIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.ac-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 22px;
  transition: background .12s;
}
.ac-item + .ac-item { box-shadow: inset 0 1px 0 var(--hairline); }
.ac-item strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; }
.ac-item span   { display: block; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; margin-top: 1px; }

/* the active row goes full-bleed dark green, white text */
.ac-item.is-active { background: var(--green-800); }
.ac-item.is-active strong,
.ac-item.is-active span { color: #fff; }
.ac-item.is-active span { color: rgba(255,255,255,.82); }

/* suggestion chips */
.chips {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 28px;
}
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-sub);
  border-radius: var(--r-pill);
  padding: 8px 20px 8px 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.chip:hover { transform: translateY(-2px); background: #eee; }
.chip i {
  width: 28px; height: 28px; border-radius: var(--r-pill);
  display: grid; place-items: center; flex: none;
}
.chip-seo   i { background: var(--green-chip); }
.chip-site  i { background: var(--red-50); }
.chip-comp  i { background: var(--warm-100); }

/* =========================================================
   STAGE 2 — scanning
   ========================================================= */

.scan-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.scan-panel {
  position: relative;
  margin: 8px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 44px 40px 32px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
}
.scan-panel h2 {
  margin: 0 0 30px;
  font-size: 21px; font-weight: 500; letter-spacing: -.02em;
}

/* checklist with a connector line between the bullets */
.checklist { list-style: none; margin: 0; padding: 0; }
.check {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  padding: 9px 0;
  font-size: 15px;
  color: var(--ink-4);
  transition: color .3s var(--ease);
}
.check::after {                       /* connector to the next bullet */
  content: "";
  position: absolute; left: 11px; top: 34px;
  width: 1px; height: 12px;
  background: var(--hairline);
  opacity: 0;
  transition: opacity .3s;
}
.check:last-child::after { display: none; }
.check.is-done::after { opacity: 1; }

.check.is-active { color: var(--ink); font-weight: 500; }
.check.is-done   { color: var(--ink); }

.check .dot {
  position: relative;
  width: 22px; height: 22px; flex: none;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--hairline);
  display: grid; place-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
/* spinner ring on the active row */
.check.is-active .dot {
  border-color: rgba(9,10,11,.12);
  border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.check.is-done .dot {
  background: var(--ink); border-color: var(--ink);
  animation: pop .28s var(--ease);
}
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

.check .dot svg { opacity: 0; transition: opacity .2s .06s; }
.check.is-done .dot svg { opacity: 1; }

.check .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* countdown pill at the bottom of the panel, with a progress hairline */
.scan-foot { margin-top: auto; position: relative; }
.scan-progress {
  position: absolute; left: 0; right: 0; top: -14px; height: 2px;
  background: var(--hairline); border-radius: 2px; overflow: hidden;
}
.scan-progress i {
  display: block; height: 100%; width: 0%;
  background: var(--ink);
  border-radius: 2px;
  transition: width .6s linear;
}
.scan-pill {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px; font-weight: 500;
}
.scan-pill .spin {
  width: 16px; height: 16px; flex: none;
  border-radius: var(--r-pill);
  border: 2px solid rgba(9,10,11,.15);
  border-top-color: var(--ink);
  animation: spin .7s linear infinite;
}

.scan-fail {
  margin-top: var(--space-5); padding: var(--space-4) var(--space-5);
  background: var(--red-50); border: 1px solid var(--red-100);
  border-radius: 12px;
}
.scan-fail b { display: block; font-size: var(--text-md); color: var(--red-700); margin-bottom: var(--space-1); }
.scan-fail p { margin: 0 0 var(--space-3); font-size: var(--text-base); color: var(--ink-2); line-height: 1.5; }
.btn-retry {
  background: var(--ink); color: #fff; border-radius: var(--r-pill);
  padding: var(--space-2) var(--space-5); font-size: var(--text-base); font-weight: 500;
}
.btn-retry:hover { opacity: .88; }

/* right-hand viewport where the scanned artifacts appear */
.scan-view {
  position: relative;
  display: grid; place-items: center;
  padding: 40px;
  overflow: hidden;
}

.artifact {
  position: absolute;
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.artifact.is-in { opacity: 1; transform: none; }

/* the green laser sweeping top→bottom across the view */
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 180px;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(87,170,48,0) 0%,
      rgba(87,170,48,.05) 55%,
      rgba(87,170,48,.16) 92%,
      rgba(87,170,48,.9) 100%);
  filter: blur(.2px);
  animation: sweep 3.4s var(--ease) infinite;
}
@keyframes sweep {
  0%   { transform: translateY(-190px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* --- artifact: fake google search bar --- */
.mock-search {
  width: 620px; max-width: 70vw;
  background: #fff; border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
  padding: 16px 24px;
  display: flex; align-items: center; gap: 14px;
  font-size: 17px; color: var(--ink-2);
}
.mock-search .caret {
  display: inline-block; width: 1px; height: 19px;
  background: var(--ink); margin-left: 1px;
  animation: blink 1s steps(2) infinite;
  vertical-align: -3px;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- artifact: google business profile card --- */
.mock-gbp {
  width: 520px; max-width: 62vw;
  background: #fff; border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 12px 12px 24px;
}
.mock-map {
  height: 172px; border-radius: 10px; position: relative; overflow: hidden;
  background:
    linear-gradient(#eef2ea, #eef2ea);
}
.mock-map .park { position: absolute; background: #dfe9d6; border-radius: 4px; }
.mock-map .road { position: absolute; background: #fff; }
.mock-map .pin {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%);
  width: 30px; height: 30px; border-radius: var(--r-pill);
  background: var(--ink); display: grid; place-items: center;
}
.mock-gbp h3 { margin: 18px 0 8px 12px; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.mock-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 10px 12px; font-size: 15px; color: var(--ink-2); }
.mock-meta .sep { color: var(--hairline); }
.mock-gbp p { margin: 0 12px; font-size: 15px; color: var(--ink-3); }

.stars { display: inline-flex; gap: 2px; }
.stars svg { display: block; }

/* --- artifact: their Google Business Profile photos --- */
.mock-photos {
  width: 540px; max-width: 64vw;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mock-photos .ph {
  aspect-ratio: 4 / 3;
  border-radius: 12px; overflow: hidden;
  background: #efece8;
  box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.mock-photos .ph.is-in { opacity: 1; transform: none; }
.mock-photos .ph.is-fail { opacity: .35; }
.mock-photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-photos .no-photos {
  grid-column: 1 / -1; padding: 40px; text-align: center;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-card);
  color: var(--ink-3); font-size: 15px;
}

/* --- artifact: phone frame --- */
.mock-phone {
  width: 282px; height: 580px;
  background: #fff; border-radius: 34px;
  box-shadow: var(--shadow-card);
  padding: 12px 10px; position: relative;
}
.mock-phone .nub { position: absolute; right: -3px; top: 150px; width: 3px; height: 46px; background: rgba(9,10,11,.07); border-radius: 2px; }
.mock-phone .bar { display: flex; align-items: center; justify-content: center; height: 62px; position: relative; }
.mock-phone .burger { position: absolute; left: 14px; display: grid; gap: 4px; }
.mock-phone .burger i { display: block; width: 18px; height: 2px; background: #2f6d76; border-radius: 2px; }
.mock-phone .brand {
  width: 74px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #2f6d76; letter-spacing: -.01em;
}
.mock-phone .shot {
  height: 468px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(165deg, #dbeef0, #9cc6cc 55%, #4d858e);
  position: relative;
  display: grid; place-items: center;
  padding: 0 20px; text-align: center;
  color: rgba(255,255,255,.95);
  font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  line-height: 1.35; overflow-wrap: anywhere;
  text-shadow: 0 2px 12px rgba(20,60,66,.35);
}

/* =========================================================
   STAGE 3 — report
   ========================================================= */

.report-stage {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 8px 8px 80px;
}

/* --- sticky score rail --- */
.score-rail {
  position: sticky; top: 8px;
  height: calc(100vh - 16px);
  border-radius: var(--r-lg);
  padding: 48px 34px 34px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #f6e7e3 0%, #f7e3dd 55%, #f6ded6 100%);
}
.score-rail[data-grade="fair"] { background: linear-gradient(180deg, #f8efdc, #f7ead0); }
.score-rail[data-grade="good"] { background: linear-gradient(180deg, #e9f2df, #dcecce); }

.dial { position: relative; width: 170px; height: 170px; margin: 8px auto 0; }
.dial svg { transform: rotate(-90deg); display: block; }
.dial .num {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
}
.dial .num b { display: block; font-size: 46px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.dial .num small { display: block; font-size: 14px; color: var(--ink-3); margin-top: 5px; }

.rail-label { text-align: center; margin-top: 22px; }
.rail-label span { display: block; font-size: 14px; color: var(--ink-2); }
.rail-label strong { display: block; font-size: 23px; font-weight: 400; margin-top: 4px; letter-spacing: -.02em; }

.bench-rank {
  margin: 0 0 18px; padding: 11px 14px;
  background: rgba(255,255,255,.55); border-radius: 10px;
  font-size: 13px; color: var(--ink-2); line-height: 1.5; text-align: center;
}
.bench-rank b { font-weight: 600; }

/* category breakdown pinned to the bottom of the rail */
.rail-cats { margin-top: auto; display: grid; gap: 22px; }
.rail-cat { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rail-cat .txt { min-width: 0; }
.rail-cat .txt b { overflow-wrap: anywhere; }
.rail-cat .mini { width: 34px; height: 34px; flex: none; }
.rail-cat .mini svg { transform: rotate(-90deg); display: block; }
.rail-cat .txt { flex: 1; }
.rail-cat .txt b { display: block; font-size: 16px; font-weight: 500; }
.rail-cat .txt span { display: block; font-size: 14px; font-weight: 600; margin-top: 1px; }
.rail-cat .score { font-size: 15px; color: var(--ink-2); }

.g-pending { color: var(--ink-4); font-style: italic; }
.rail-cat.is-pending .txt b { color: var(--ink-3); }
.score-rail.is-provisional .dial .num b { opacity: .78; }
.g-poor { color: var(--red-700); }
.g-fair { color: var(--amber-600); }
.g-good { color: var(--green-500); }

/* --- report body --- */
.report-body { display: grid; gap: 20px; padding: 24px 24px 0 8px; }

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.card-head h2 {
  margin: 0 0 6px;
  font-size: 23px; font-weight: 500; letter-spacing: -.02em; line-height: 1.22;
  text-wrap: balance;
}
.card-head p { margin: 0; color: var(--ink-3); font-size: 14px; }

.report-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

/* money-at-risk card */
.biz { margin: 22px 0 20px; }
.biz b { display: block; font-size: 18px; font-weight: 500; }
.biz span { display: block; font-size: 14px; color: var(--ink-3); }

.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.problems li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink-2); }
.problems li svg { flex: none; margin-top: 2px; }

/* competitor leaderboard */
.ranks { list-style: none; margin: 20px 0 0; padding: 0; }
.rank {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  box-shadow: inset 0 -1px 0 var(--hairline);
  font-size: 15px;
}
.rank:last-child { box-shadow: none; }
.rank .av {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  background: var(--surface-sub);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .rt { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 14px; }
.rank .pos { width: 44px; text-align: right; color: var(--ink-3); font-size: 14px; }
.rank.is-you { font-weight: 600; }
.rank.is-you .av { background: var(--red-50); color: var(--red-700); }
.rank.is-you .pos { color: var(--red-700); }

/* keyword ranking table */
.kw-table { margin-top: 22px; }
.kw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: 16px;
  padding: 15px 0;
  box-shadow: inset 0 -1px 0 var(--hairline);
}
.kw:last-child { box-shadow: none; }
.kw .term { display: flex; align-items: center; gap: 12px; font-size: 15px; min-width: 0; }
.kw .term .g { flex: none; }
.kw .term .t { min-width: 0; }
.kw .term .t b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw .term .t .vol {
  display: block; font-size: 12px; color: var(--ink-4); margin-top: 2px;
}
.kw .term .t em.is-win { color: var(--green-700); font-weight: 500; }
.kw .term .t em {
  display: block; font-style: normal; font-size: 13px; color: var(--red-700); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kw .slot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.badge {
  border-radius: 7px; padding: 5px 10px;
  font-size: 13px; font-weight: 500;
  background: var(--surface-sub); color: var(--ink-3);
}
.badge.is-ranked { background: var(--green-100); color: var(--green-700); }

/* --- detail sections --- */
.sect-head {
  display: flex; align-items: flex-start; gap: 18px;
  margin-bottom: 26px;
}
.sect-head .idx {
  font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--ink-4);
  line-height: 1.15;
}
.sect-head .txt { flex: 1; }
.sect-head h3 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.sect-head p  { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.sect-head .pts { font-size: 18px; font-weight: 500; white-space: nowrap; }

.group { margin-top: 26px; }
.group h4 {
  margin: 0 0 6px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-4);
}

.checks { list-style: none; margin: 0; padding: 0; }
.crow {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 13px 0;
  box-shadow: inset 0 -1px 0 var(--hairline);
}
.crow:last-child { box-shadow: none; }
.crow .ic { flex: none; margin-top: 1px; }
.crow .body { flex: 1; min-width: 0; }
.crow .body b { display: block; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
.crow .body p { margin: 3px 0 0; font-size: 14px; color: var(--ink-3); }
/* values must be allowed to wrap — keyword lists and descriptions are long
   enough to force the whole row off-canvas when held on one line */
.crow .val {
  font-size: 14px; color: var(--ink-3);
  min-width: 0; max-width: 42%;
  text-align: right; overflow-wrap: anywhere;
}

/* page speed strip */
.speed { display: flex; align-items: center; gap: 14px; margin: 20px 0 18px; }
.speed .big { font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.pass { background: var(--green-100); color: var(--green-700); border-radius: 7px; padding: 5px 11px; font-size: 13px; font-weight: 600; }
.pass.is-warn { background: var(--amber-100); color: #8a5d14; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 18px; margin-top: 18px; }
.metric { background: var(--bg); border-radius: 12px; padding: 16px; }
.metric b { display: block; font-size: 20px; font-weight: 500; }
.metric span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }

/* still being checked — must not read as a failure */
.crow.is-pending .body b { color: var(--ink-3); }
.crow.is-pending .val { color: var(--ink-4); font-style: italic; }
.spin-ic { animation: spin .9s linear infinite; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { .spin-ic { animation: none; } }

/* rows we genuinely couldn't check */
.crow.is-unknown .body b { color: var(--ink-3); }
.crow.is-unknown .val { color: var(--ink-4); font-style: italic; }

/* scan caveats */
.card.notice { background: #fdf6e9; box-shadow: none; border: 1px solid var(--amber-100); padding: 22px 26px; }
.card.notice b { display: block; font-size: 15px; margin-bottom: 8px; }
.card.notice ul { margin: 0; padding-left: 18px; }
.card.notice li { font-size: 14px; color: var(--ink-2); margin: 4px 0; }

/* empty state for missing SERP data */
.empty { background: var(--bg); border-radius: 12px; padding: 26px; margin-top: 20px; }
.empty b { display: block; font-size: 16px; margin-bottom: 8px; }
.empty p { margin: 0 0 10px; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.empty code {
  background: #fff; border: 1px solid var(--hairline); border-radius: 6px;
  padding: 2px 7px; font-size: 13px;
}
.empty code.pid { display: inline-block; margin-bottom: 12px; font-size: 13px; word-break: break-all; }

/* demo-data note — informative, not alarming */
.sample-flag {
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 11px 16px; margin-top: 18px;
}
.sample-flag span { font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.sample-flag b { color: var(--ink-2); font-weight: 500; }

/* revenue working */
.working { margin-top: 22px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.working summary {
  cursor: pointer; font-size: 14px; color: var(--ink-3);
  list-style: none; display: flex; align-items: center; gap: 7px;
}
.working summary::-webkit-details-marker { display: none; }
.working summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
.working[open] summary::before { transform: rotate(90deg); }
.working summary:hover { color: var(--ink); }
.working-body { margin-top: 14px; }
.wrow {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; font-size: 14px;
  box-shadow: inset 0 -1px 0 var(--hairline);
}
.wrow span { color: var(--ink-3); }
.wrow b { font-weight: 500; white-space: nowrap; }
.wrow.is-total { box-shadow: none; font-weight: 600; padding-top: 12px; }
.wrow.is-total span { color: var(--ink); }
.wnote { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-4); line-height: 1.6; }
.wnote code { background: var(--surface-sub); border-radius: 4px; padding: 1px 5px; }

/* review benchmark bars */
.bench { margin-top: 22px; display: grid; gap: 12px; }
.bench-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.bench-row .bl { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-row .bar { height: 12px; background: var(--surface-sub); border-radius: var(--r-pill); overflow: hidden; }
.bench-row .bar i { display: block; height: 100%; background: var(--green-700); border-radius: var(--r-pill); }
.bench-row.is-rival .bar i { background: #cfc9c2; }
.bench-row.is-rival .bl { color: var(--ink-3); font-weight: 400; }
.bench-row .bv { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.bench-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.bench-note.caveat { color: var(--ink-4); font-style: italic; }

/* sentiment themes */
.senti { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.senti-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.senti-head b { font-size: 15px; }
.senti-count { font-size: 13px; color: var(--ink-3); }
.themes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.themes li { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.themes .tn { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.themes .tbar { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-sub); }
.themes .tbar i { display: block; }
.themes .tbar .p { background: var(--green-500); }
.themes .tbar .n { background: #d8d3cc; }
.themes .tbar .g { background: var(--red-500); }
.themes .tc { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 700px) {
  .bench-row, .themes li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bench-row .bar, .themes .tbar { order: 3; }
}

/* --- the gate --- */
.gated { filter: blur(7px); pointer-events: none; user-select: none; }

.gate-scrim {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(251,248,245,.25);
  backdrop-filter: blur(1px);
}
.gate {
  width: 100%; max-width: 520px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  padding: 44px 44px 40px;
  text-align: center;
  animation: rise .35s var(--ease) both;
}
.gate .lock { margin-bottom: 12px; }
.gate h2 { margin: 0 0 12px; font-size: 32px; font-weight: 400; letter-spacing: -.025em; }
.gate > p { margin: 0 0 26px; color: var(--ink-2); font-size: 16px; text-wrap: balance; }

.verify {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--surface-sub);
  text-align: left;
  width: 100%;
  transition: background .18s;
}
.verify:hover { background: #eee; }
.verify .box {
  width: 26px; height: 26px; flex: none;
  border: 2px solid rgba(9,10,11,.25);
  border-radius: 4px; background: #fff;
  display: grid; place-items: center;
}
.verify .box svg { opacity: 0; transition: opacity .2s; }
.verify.is-checked .box { background: var(--green-800); border-color: var(--green-800); }
.verify.is-checked .box svg { opacity: 1; }
.verify .lbl { flex: 1; font-size: 17px; }
.verify .mark { text-align: right; font-size: 11px; color: var(--ink-3); line-height: 1.3; }
.verify .mark b { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }

.gate .legal { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.gate .legal a { text-decoration: underline; display: inline-block; padding: 4px 2px; }

/* real site screenshot inside the phone mock */
.mock-phone .shot.has-shot {
  background-size: cover; background-position: top center;
  text-shadow: none;
}

/* the practice's own logo in the header chip */
.mock-phone .brand.has-logo {
  border: 0; width: auto; max-width: 140px; height: 44px;
  padding: 0 6px;
}
.mock-phone .brand.has-logo img {
  max-width: 100%; max-height: 40px;
  object-fit: contain; display: block;
}

/* who's buying ads on these terms */
.ads-note {
  margin-top: 22px; padding: 16px 20px;
  background: var(--bg); border-radius: 12px;
}
.ads-note b { display: block; font-size: 14px; margin-bottom: 6px; }
.ads-note p { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.7; }
.ads-note .adv {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  padding: 3px 11px; margin: 3px 4px 0 0; font-size: 13px; color: var(--ink-2);
}
.ads-note .adv i { font-style: normal; font-size: 11px; color: var(--ink-4); }

/* --- priced action plan --- */
.card.plan { border: 1px solid var(--green-200); }
.actions { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: a; }
.action {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start; gap: 16px;
  padding: 18px 0;
  box-shadow: inset 0 -1px 0 var(--hairline);
}
.action:last-child { box-shadow: none; padding-bottom: 0; }
.anum {
  width: 26px; height: 26px; border-radius: var(--r-pill);
  background: var(--green-800); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.abody b { display: block; font-size: 16px; font-weight: 500; }
.ahow { margin: 5px 0 0; font-size: 14px; color: var(--ink-2); }
.awhy { margin: 4px 0 0; font-size: 13px; color: var(--ink-4); }
.ameta { text-align: right; white-space: nowrap; }
.aval { display: block; font-size: 19px; font-weight: 600; color: var(--green-700); }
.aval small { font-size: 12px; font-weight: 400; color: var(--ink-4); }
.aeff {
  display: inline-block; margin-top: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--r-pill); padding: 3px 9px;
}
.eff-low    { background: var(--green-100); color: var(--green-700); }
.eff-medium { background: var(--amber-100); color: #8a5d14; }
.eff-high   { background: var(--red-50);    color: var(--red-700); }

/* --- website screenshots --- */
.shots { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin-top: 20px; }
.shot-fig { margin: 0; }
.shot-frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--hairline); background: #fff;
  aspect-ratio: 9 / 13; display: grid; place-items: center;
  box-shadow: var(--shadow-card);
}
.shot-frame.tall { aspect-ratio: 9 / 16; max-width: 240px; }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.shot-none { font-size: 13px; color: var(--ink-4); }
.shot-fig figcaption {
  margin-top: 9px; font-size: 12.5px; color: var(--ink-3);
  text-align: center; overflow-wrap: anywhere;
}

.sitecard-body { display: flex; gap: 26px; align-items: flex-start; margin-top: 20px; flex-wrap: wrap; }
.sitecard-meta { flex: 1; min-width: 200px; display: grid; gap: 8px; align-content: start; }
.sitecard-meta .pg {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; box-shadow: inset 0 -1px 0 var(--hairline);
}
.sitecard-meta .pg b {
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--green-700); min-width: 66px;
}
.sitecard-meta .pg span { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }

@media (max-width: 560px) { .shots { grid-template-columns: minmax(0,1fr); } }

/* --- head-to-head --- */
.vs-lede { margin: 20px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.vs { margin-top: 20px; }
.vs-head, .vs-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px;
  align-items: center; gap: 12px;
}
.vs-head { padding-bottom: 10px; box-shadow: inset 0 -1px 0 var(--hairline); }
.vs-head span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); text-align: center; overflow-wrap: anywhere; min-width: 0; }
.vs-head span:first-child { text-align: left; }
.vs-head .vs-you { color: var(--ink); }
.vs-row { padding: 11px 0; box-shadow: inset 0 -1px 0 var(--hairline); }
.vs-row:last-child { box-shadow: none; }
.vs-row.is-gap { background: linear-gradient(90deg, rgba(250,232,232,.5), transparent 70%); border-radius: 8px; }
.vs-label { font-size: 14px; }
.vs-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vs-cell i { font-style: normal; font-size: 11px; color: var(--ink-4); text-align: center; }

@media (max-width: 640px) {
  .crow { flex-wrap: wrap; }
  .crow .val { max-width: 100%; text-align: left; padding-left: 31px; }

  .action { grid-template-columns: 26px minmax(0, 1fr); }
  .ameta { grid-column: 2; text-align: left; margin-top: 6px; }
  .vs-head, .vs-row { grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 8px; }
}

/* --- PDF / print --- */

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.btn-pdf {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-pill); padding: 9px 18px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-card);
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.btn-pdf:hover { transform: translateY(-1px); background: #fff; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }

  html, body { background: #fff !important; }

  /* chrome that shouldn't print */
  .topbar, .gate-scrim, .scan-stage, .search-stage { display: none !important; }

  /* the report becomes a single column so nothing is cropped */
  .report-stage { display: block !important; padding: 0 !important; }

  .score-rail {
    position: static !important; height: auto !important;
    break-inside: avoid; page-break-inside: avoid;
    padding: 20px 24px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center; gap: 28px;
    margin-bottom: 14px;
  }
  .score-rail .dial { margin: 0; }
  .rail-label { text-align: left; margin: 0; }
  .rail-cats { margin-top: 14px !important; grid-column: 1 / -1; }

  .report-body { padding: 0 !important; gap: 12px !important; }

  .card {
    box-shadow: none !important;
    border: 1px solid #e6e1db;
    padding: 18px 20px !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  .report-cols { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 12px !important; }

  /* keep rows and groups intact across page breaks */
  .crow, .kw, .rank, .bench-row, .themes li, .metric, .wrow,
  .action, .vs-row { break-inside: avoid; page-break-inside: avoid; }
  .group { break-inside: avoid-page; }

  /* expanded working, no interactive affordances */
  .working summary { list-style: none; color: var(--ink-2); }
  .working summary::before { display: none; }

  .gated { filter: none !important; }

  /* tighten type for paper */
  .card-head h2 { font-size: 18px !important; }
  .sect-head h3 { font-size: 17px !important; }
  .crow .body b, .kw .term .t b { font-size: 13px !important; }
  .crow .body p { font-size: 12px !important; }

  a { text-decoration: none; color: inherit; }
}

/* --- responsive --- */
@media (max-width: 1080px) {
  .report-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .scan-stage { grid-template-columns: minmax(0, 1fr); }
  .scan-view { display: none; }
  .report-stage { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; }
  .score-rail { position: static; height: auto; padding: 40px 28px; }
  .rail-cats { margin-top: 34px; }
  .report-body { padding: 0; }
  .card { padding: 28px; }
  .card-head h2 { font-size: 24px; }
  .gate { padding: 32px 24px; }
  .gate h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* secondary line inside an empty-state panel */
.empty .muted { color: var(--ink-4); font-size: 13px; }



/* ---------- technical SEO review ----------
   Uses this stylesheet's own tokens (--space-*, --hairline, --surface-sub).
   An earlier version referenced --s4 / --line / --sub from a different
   project, so every gap, border and background silently did nothing. */
.da-head {
  display: flex; gap: var(--space-7); flex-wrap: wrap; align-items: flex-start;
  padding-bottom: var(--space-4); margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--hairline);
}
.da-stat { display: flex; flex-direction: column; gap: 2px; }
.da-stat b {
  font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.da-stat b.is-bad { color: var(--red-500); }
.da-stat span { font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.da-partial {
  flex-basis: 100%; margin: var(--space-2) 0 0; font-size: 12.5px; color: var(--amber-600);
}

.da-group { margin-bottom: var(--space-6); }
.da-group h3 {
  margin: 0 0 var(--space-2); font-size: 11.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4);
}
.da-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  column-gap: var(--space-4); row-gap: 0;
  align-items: baseline;
  padding: var(--space-3) 0; border-top: 1px solid var(--hairline);
}
.da-count {
  font-size: 20px; font-weight: 600; line-height: 1.2; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink-3);
}
.da-row.sev-high .da-count   { color: var(--red-500); }
.da-row.sev-medium .da-count { color: var(--amber-600); }
.da-body { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.da-text { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.da-eg { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.da-eg code {
  font-size: 11.5px; color: var(--ink-4); background: var(--surface-sub);
  padding: 3px 8px; border-radius: 6px; overflow-wrap: anywhere;
}
.da-clean {
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center;
  padding-top: var(--space-4); margin-top: var(--space-2);
  border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--ink-4);
}
.da-clean span {
  background: var(--surface-sub); color: var(--ink-3);
  padding: 3px 10px; border-radius: var(--r-pill, 999px);
}
.da-allclear { margin: 0; font-size: 14.5px; }

@media (max-width: 640px) {
  .da-head { gap: var(--space-5); }
  .da-row { grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--space-3); }
  .da-stat b { font-size: 24px; }
}

/* Rankings take 10-30s to come back. An indeterminate indicator is
   honest about that; a percentage would be invented, since the provider
   reports no progress. */
.serp-loading { display: flex; gap: 6px; padding-top: var(--space-3); }
.serp-loading i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4);
  animation: serpPulse 1.2s ease-in-out infinite;
}
.serp-loading i:nth-child(2) { animation-delay: .18s; }
.serp-loading i:nth-child(3) { animation-delay: .36s; }
@keyframes serpPulse { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .serp-loading i { animation: none; opacity: .5; }
}

/* ---------- contact CTA in the score rail ----------
   Sits in the space between the grade and the category rows, which was
   empty on every report. The rail is sticky, so this stays in view for
   the whole scroll. */
.rail-cta {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--r-lg);
  backdrop-filter: blur(4px);
}
.rail-cta b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.rail-cta p { margin: 6px 0 var(--space-4); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.cta-btn {
  display: block; text-align: center; text-decoration: none;
  background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  transition: transform .15s var(--ease), opacity .15s var(--ease);
}
.cta-btn:hover { transform: translateY(-1px); opacity: .92; }
.cta-alt {
  display: block; text-align: center; margin-top: var(--space-2);
  font-size: 12.5px; color: var(--ink-3);
}

/* the rail collapses on small screens, so the CTA follows the content */
@media (max-width: 900px) {
  .rail-cta { grid-column: 1 / -1; margin-top: var(--space-4); }
}
