/*
  The Signal Mark — the stylesheet.

  Every value here comes from tokens.css. If you find yourself typing a hex code
  or a pixel radius, it belongs in tokens.css instead.

  Written mobile-first: the base rules are the phone layout, and the media
  queries add columns. That order matters on this product more than most — the
  buyer is a small-business owner looking something up on a phone, quite possibly
  while standing next to the broken computer.
*/

/* ── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-strong);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink-navy);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-heading);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; }

a { color: var(--signal-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

/* A visible focus ring everywhere. This site is used by people who may be
   navigating by keyboard; a subtle indicator is no indicator. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

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

/* Skip link — the first thing a keyboard user meets. */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink-navy); color: #fff;
  padding: 10px 16px; border-radius: var(--r-chip); z-index: 100;
}
.skip-link:focus { left: var(--pad-x); top: 10px; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.wrap-tight { max-width: var(--container-tight); }

.stack > * + * { margin-top: var(--gap); }
.rhythm > * + * { margin-top: var(--rhythm); }

.eyebrow {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted-alt);
  margin-bottom: 10px;
}

.muted { color: var(--text-body); }
.small { font-size: var(--fs-small); }
.tiny  { font-size: var(--fs-tiny); }

/* ── Top navigation ─────────────────────────────────────────────────────── */

.topnav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.topnav .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 17px;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark .w-the    { color: var(--text-muted-alt); font-weight: 600; }
.wordmark .w-signal { color: var(--signal-blue); }
.wordmark .w-mark   { color: var(--ink-navy); }

.navlinks {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.navlinks::-webkit-scrollbar { display: none; }

.navlinks a {
  padding: 8px 13px; border-radius: var(--r-pill);
  color: var(--nav-inactive); font-size: var(--fs-small); font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.navlinks a:hover { background: var(--paper); text-decoration: none; }
.navlinks a[aria-current="page"] { background: var(--ink-navy); color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent; border-radius: var(--r-input);
  font-family: inherit; font-size: var(--fs-small); font-weight: 700;
  cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--signal-blue); color: #fff; }
.btn-primary:hover { background: var(--signal-blue-hover); }

.btn-navy { background: var(--ink-navy); color: #fff; }
.btn-navy:hover { background: var(--ink-panel); }

.btn-quiet {
  background: var(--surface); color: var(--ink-navy);
  border-color: var(--input-border);
}
.btn-quiet:hover { background: var(--paper); }

.btn-ghost { background: transparent; color: var(--text-body); }
.btn-ghost:hover { background: var(--paper); }

.btn-danger { background: var(--red-text); color: #fff; }
.btn-danger:hover { background: #a53024; }

.btn-block { width: 100%; }
.btn-big { padding: 14px 24px; font-size: 16px; }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed;
}

/* ── Cards and bands ────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--pad-card);
  box-shadow: var(--shadow-hairline);
}
.card-lift { box-shadow: var(--shadow-card); border-radius: var(--r-panel); }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .note { font-size: var(--fs-tiny); color: var(--text-muted); }

.band-navy {
  background: var(--ink-navy); color: #fff;
  border-radius: var(--r-band);
  padding: 34px var(--pad-card);
  position: relative; overflow: hidden;
}
.band-navy h2, .band-navy h1 { color: #fff; }
.band-navy p { color: var(--sky); }

/* The oversized watermark in the corner of a navy band. */
.band-navy .watermark {
  position: absolute; right: -10px; bottom: -20px;
  opacity: .09; pointer-events: none;
}

/* ── Pills, chips and status ────────────────────────────────────────────────
   Every status is icon AND colour AND label. A buyer who cannot tell green
   from amber must still be able to tell a verified credential from a lapsed
   one, and roughly one man in twelve cannot. */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-tiny); font-weight: 700;
  white-space: nowrap;
}
.pill-verified { background: var(--green-fill); color: var(--green-text); }
.pill-neutral  { background: var(--paper);      color: var(--text-body); border: 1px solid var(--hairline); }
.pill-pending  { background: var(--amber-fill); color: var(--amber-text); }
.pill-expired  { background: var(--red-bg);     color: var(--red-text); }
.pill-sponsored{ background: var(--blue-tint);  color: var(--signal-blue); }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: .02em;
}
.tag-country { background: var(--blue-tint); color: var(--signal-blue); }
.tag-global  { background: var(--green-fill); color: var(--green-text); }

/* ── Credential chips ───────────────────────────────────────────────────── */

.cred-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .cred-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

.cred {
  display: flex; gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  background: var(--surface);
}
.cred-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.cred-verified .cred-icon { background: var(--green-fill); color: var(--green-text); }
.cred-pending  { background: var(--amber-bg); border-color: var(--amber-border); }
.cred-pending .cred-icon { background: var(--amber-fill); color: var(--amber-text); }
.cred-expired  { background: var(--red-bg-soft); border-color: var(--red-border); }
.cred-expired .cred-icon { background: var(--red-bg); color: var(--red-text); }

.cred-name {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-weight: 700; color: var(--ink-navy); font-size: var(--fs-small);
}
.cred-meta { font-size: var(--fs-tiny); color: var(--text-body); margin-top: 2px; }
.cred-pending .cred-meta { color: var(--amber-text); }
.cred-expired .cred-meta { color: var(--red-text); }
.cred-source { font-size: var(--fs-tiny); font-weight: 600; }

/* ── Stars and ratings ──────────────────────────────────────────────────── */

.stars { display: inline-flex; gap: 1px; color: var(--star-gold); line-height: 1; }
.stars .off { color: var(--hairline); }

.rating-big {
  font-size: 38px; font-weight: 800; color: var(--ink-navy);
  letter-spacing: var(--tracking-tight); line-height: 1;
}

.rating-inline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-small);
}
.rating-inline strong { color: var(--ink-navy); font-size: 16px; }

/* Sub-scores. The four bars are what make a handful of reviews informative —
   an averaged star out of four reviews says almost nothing on its own. */
.subscores { display: grid; gap: 12px; }
.subscore-row { display: grid; gap: 4px; }
.subscore-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--fs-small); font-weight: 600; color: var(--text-strong);
}
.subscore-head .val { font-weight: 800; color: var(--ink-navy); }
.meter {
  height: 8px; border-radius: var(--r-chip);
  background: var(--track); overflow: hidden;
}
.meter > span {
  display: block; height: 100%; border-radius: var(--r-chip);
  background: var(--signal-blue);
}

@media (min-width: 720px) {
  .score-block { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center; }
  .score-block .score-summary { text-align: center; }
}

/* ── Reviews ────────────────────────────────────────────────────────────── */

.review + .review {
  margin-top: 22px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.review-head {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.review-head .who { font-weight: 700; color: var(--ink-navy); }
.review-head .when { margin-left: auto; font-size: var(--fs-tiny); color: var(--text-muted); }
.review-body { color: var(--text-strong); }

/* The provider's reply, indented under the review it answers. Never a private
   back-channel — this is the whole point of the right of reply. */
.reply {
  margin-top: 12px; padding: 13px 15px;
  background: #f7f9fd;
  border-left: 3px solid var(--blue-tint);
  border-radius: 0 var(--r-chip) var(--r-chip) 0;
}
.reply-head {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: var(--fs-small); color: var(--ink-navy);
  margin-bottom: 4px;
}
.reply p { margin: 0; font-size: var(--fs-small); color: var(--text-strong); }

/* ── Search ─────────────────────────────────────────────────────────────── */

.searchbar {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-search);
  padding: 8px;
  display: grid; gap: 8px;
}
.searchbar .field { display: grid; gap: 3px; padding: 8px 12px; }
.searchbar .field label {
  font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.searchbar .field input {
  border: 0; padding: 0; font-family: inherit; font-size: 16px;
  color: var(--ink-navy); background: transparent; width: 100%;
}
.searchbar .field input:focus { outline: none; }
.searchbar .divider { display: none; }

@media (min-width: 760px) {
  .searchbar {
    grid-template-columns: 1fr 1px 1fr auto;
    align-items: center;
  }
  .searchbar .divider {
    display: block; width: 1px; height: 34px; background: var(--hairline);
  }
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.field-set { display: grid; gap: 16px; }

.field-row { display: grid; gap: 5px; }
.field-row > label {
  font-size: var(--fs-small); font-weight: 700; color: var(--ink-navy);
}
.field-row .hint { font-size: var(--fs-tiny); color: var(--text-body); }
.field-row .error { font-size: var(--fs-tiny); color: var(--red-text); font-weight: 600; }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--input-border);
  border-radius: var(--r-input);
  background: var(--surface);
  font-family: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--ink-navy);
}
textarea { min-height: 150px; resize: vertical; line-height: var(--lh-body); }

input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--signal-blue); box-shadow: var(--focus-ring);
}

fieldset { border: 0; margin: 0; padding: 0; }
legend {
  padding: 0; margin-bottom: 8px;
  font-size: var(--fs-small); font-weight: 700; color: var(--ink-navy);
}

.check-list { display: grid; gap: 9px; }
.check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: var(--fs-small); color: var(--text-strong);
}
.check input { margin-top: 3px; flex: 0 0 auto; width: auto; }

/* Chip-style filters and toggles. */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--paper); color: var(--text-body);
  font-size: var(--fs-tiny); font-weight: 600; cursor: pointer;
}
.chip:hover { text-decoration: none; border-color: var(--input-border); }
.chip[aria-pressed="true"], .chip.on {
  background: var(--signal-blue); color: #fff; border-color: var(--signal-blue);
}

/* ── Notices ────────────────────────────────────────────────────────────── */

.notice {
  padding: 13px 16px; border-radius: var(--r-tile);
  font-size: var(--fs-small);
  border: 1px solid transparent;
}
.notice-good { background: var(--green-fill); border-color: var(--green-border); color: var(--green-text); }
.notice-warn { background: var(--amber-bg);  border-color: var(--amber-border); color: var(--amber-text); }
.notice-bad  { background: var(--red-bg);    border-color: var(--red-border);   color: var(--red-text); }
.notice-info { background: var(--blue-tint); border-color: #d4e2ff;             color: var(--ink-navy); }
.notice strong { display: block; margin-bottom: 2px; }

/* ── Result cards ───────────────────────────────────────────────────────── */

.results { display: grid; gap: 14px; }

.result {
  display: grid; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: var(--shadow-hairline);
}
.result-avatar {
  width: 56px; height: 56px; border-radius: var(--r-tile);
  background: var(--blue-tint); color: var(--signal-blue);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  flex: 0 0 auto;
}
.result-title {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 2px;
}
.result-title h3 { margin: 0; font-size: 18px; }
.result-where { font-size: var(--fs-tiny); color: var(--text-body); }
.result-desc { font-size: var(--fs-small); color: var(--text-body); margin: 8px 0; }

@media (min-width: 700px) {
  .result { grid-template-columns: 56px 1fr auto; align-items: start; }
  .result .result-action { align-self: center; }
}

/* ── Two-column bodies ──────────────────────────────────────────────────── */

.split { display: grid; gap: 22px; }
@media (min-width: 960px) {
  .split-profile  { grid-template-columns: 1fr 320px; align-items: start; }
  .split-filters  { grid-template-columns: 250px 1fr; align-items: start; }
  .split-dash     { grid-template-columns: 210px 1fr; align-items: start; }
  .sticky-col { position: sticky; top: 84px; }
}

/* ── Profile header ─────────────────────────────────────────────────────── */

.profile-head { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 26px 0; }
.profile-head .inner { display: grid; gap: 18px; }
.profile-id { display: flex; gap: 15px; align-items: flex-start; }
.profile-avatar {
  width: 68px; height: 68px; border-radius: var(--r-tile);
  background: var(--blue-tint); color: var(--signal-blue);
  display: grid; place-items: center; font-size: 27px; font-weight: 800;
  flex: 0 0 auto;
}
.profile-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-title h1 { margin: 0; }
.profile-where { font-size: var(--fs-small); color: var(--text-body); margin-top: 3px; }
.checked-line { font-size: var(--fs-tiny); color: var(--text-muted); margin-top: 3px; }
.checked-line strong { color: var(--text-strong); }

@media (min-width: 860px) {
  .profile-head .inner { grid-template-columns: 1fr auto; align-items: center; }
  .profile-actions { text-align: right; }
}

/* ── Stat tiles ─────────────────────────────────────────────────────────── */

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-tile); padding: 16px;
}
.tile .n { font-size: 26px; font-weight: 800; color: var(--ink-navy); line-height: 1.1; }
.tile .k { font-size: var(--fs-tiny); color: var(--text-body); margin-top: 3px; }

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: var(--fs-small);
}
table.data th, table.data td {
  padding: 10px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
table.data th {
  font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); font-weight: 700;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }

/* ── Embed snippet panel ────────────────────────────────────────────────── */

.code-panel {
  background: var(--ink-navy); color: var(--sky);
  border-radius: var(--r-tile); padding: 16px;
}
.code-panel .code-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.code-panel .code-head span {
  font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted-alt);
}
.code-panel pre {
  margin: 0; overflow-x: auto;
  font-family: var(--font-mono); font-size: var(--fs-tiny); line-height: 1.65;
  color: #cfe0ff; white-space: pre;
}
.code-panel code { font-family: inherit; }

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 26px; }
.pager .count { font-size: var(--fs-tiny); color: var(--text-body); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  margin-top: 60px; padding: 34px 0;
  background: var(--ink-navy); color: var(--sky);
  font-size: var(--fs-small);
}
.footer a { color: #fff; }
.footer .cols { display: grid; gap: 24px; }
.footer h4 {
  color: #fff; font-size: var(--fs-tiny); text-transform: uppercase;
  letter-spacing: .1em; margin-bottom: 10px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer .legal {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--ink-hairline);
  color: var(--text-muted-alt); font-size: var(--fs-tiny);
}
@media (min-width: 700px) {
  .footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  padding: 52px 0 40px;
  text-align: center;
}
.hero .inner { max-width: 1000px; margin: 0 auto; }
.hero h1 {
  font-size: 34px; line-height: var(--lh-hero); margin-bottom: 14px;
}
.hero .sub { font-size: 17px; color: var(--text-body); margin-bottom: 26px; }
@media (min-width: 860px) {
  .hero { padding: 72px 0 56px; }
  .hero h1 { font-size: var(--fs-hero); }
  .hero .sub { font-size: var(--fs-lead); }
}

/* Three-up explainer grid. */
.trio { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.icon-tile {
  width: 46px; height: 46px; border-radius: var(--r-tile);
  background: var(--blue-tint); color: var(--signal-blue);
  display: grid; place-items: center; margin-bottom: 12px;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */

.stepper { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-tiny); font-weight: 700; color: var(--text-muted);
}
.step .n {
  width: 22px; height: 22px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--track); color: var(--text-muted); font-size: var(--fs-micro);
}
.step.done .n { background: var(--green-fill); color: var(--green-text); }
.step.done { color: var(--green-text); }
.step.active .n { background: var(--signal-blue); color: #fff; }
.step.active { color: var(--ink-navy); }

/* Star picker for the review form. Radio inputs styled as stars — keyboard
   operable and screen-reader sane, because a div soup star picker is unusable
   for anyone not holding a mouse. */
.star-picker { display: inline-flex; flex-direction: row-reverse; gap: 3px; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker label {
  font-size: 30px; line-height: 1; cursor: pointer;
  color: var(--hairline); transition: color .12s;
}
.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label { color: var(--star-gold); }
.star-picker input:focus-visible + label { box-shadow: var(--focus-ring); border-radius: 4px; }

.subscore-picker { display: grid; gap: 12px; }
.subscore-picker .row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.subscore-picker .row > span { font-size: var(--fs-small); font-weight: 600; }
.subscore-picker .star-picker label { font-size: 22px; }

/* ── Print ──────────────────────────────────────────────────────────────────
   Profiles get printed. A small business owner comparing three quotes will
   print them, and a page that prints its navigation and none of its credentials
   is no use to them. */
@media print {
  .topnav, .footer, .profile-actions, .pager, .btn { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
}
