/* TrustedByPeople.
   Light and quiet: white page, thin lines, no boxes unless they group something.
   One loud element per page: the shield on lists, the coloured verdict on a company page. */

@view-transition { navigation: auto; }

:root {
  --accent: #2346e8;
  --accent-dark: #1a36bd;
  --accent-soft: #eef1fe;
  --ink: #121735;
  --text: #2d3350;
  --muted: #646b8a;
  --line: #e4e8f1;
  --soft: #f5f7fb;
  --empty: #cfd5e4;
  --track: #e6e9f2;
  --ok: #0b7a55;
  --warn: #9a5b00;
  --bad: #b3261e;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
}

/* Verdict colours: the traffic light. Each one keeps white text readable. */
.v-green { --v: #0a7d52; --v-soft: #e2f5ec; }
.v-lime  { --v: #3f7a12; --v-soft: #ebf5df; }
.v-amber { --v: #a56500; --v-soft: #fdf0d5; }
.v-red   { --v: #c0321f; --v-soft: #fde8e4; }
.v-none  { --v: #5f6787; --v-soft: #eef0f6; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.5 "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, b, strong { color: var(--ink); }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; margin: 0; }
h2 { font-size: 18px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 700; margin: 10px 0 4px; }
p { margin: 0 0 12px; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { display: block; }
svg text { font-family: inherit; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; min-height: 60vh; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); border: 0; padding: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: #fff; padding: 8px 12px; }
.muted { color: var(--muted); }

.f-accent { fill: var(--accent); }
.f-empty { fill: var(--empty); }
.f-track { fill: var(--track); }
.f-white { fill: #fff; }
.s-accent { stop-color: var(--accent); }
.s-empty { stop-color: var(--empty); }

.demo-bar { margin: 0; padding: 6px 24px; background: #fff6d6; color: #5c4400; font-size: 13px; text-align: center; }

/* ---------- Header ---------- */

.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.top-logo:hover { text-decoration: none; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; font-weight: 400; }
.logo b { font-weight: 800; }
.mark { height: 26px; width: auto; }

.search { flex: 1; max-width: 400px; position: relative; }
.search-off { visibility: hidden; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 38px; border: 1px solid transparent; border-radius: 999px; background: var(--soft); padding: 0 14px 0 38px; font: inherit; font-size: 15px; color: var(--ink); }
.search input::placeholder, .hero-search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.top-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top-nav a:not(.btn) { color: var(--text); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- Home hero ---------- */

.hero { position: relative; overflow: hidden; background: var(--accent-soft); border-radius: var(--r-l); padding: clamp(24px, 4vw, 40px); margin-bottom: 32px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); max-width: 16ch; position: relative; }
.hero p { font-size: 17px; margin: 10px 0 20px; max-width: 40ch; position: relative; }
.hero-shield { position: absolute; right: -30px; top: -20px; height: 150%; width: auto; fill: none; stroke: var(--accent); stroke-width: 4; opacity: .1; transform: rotate(8deg); }
.hero-search { position: relative; display: flex; gap: 6px; max-width: 520px; background: #fff; border-radius: 999px; padding: 5px; border: 1px solid var(--line); }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #fff; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: inherit; color: var(--ink); }
.hero-search input:focus { outline: none; }

/* ---------- Two-column pages ---------- */

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.side { display: grid; gap: 28px; }
.panel h2 { font-size: 16px; }
.panel p:last-child { margin-bottom: 0; }
.panel-quiet { background: var(--soft); border-radius: var(--r-l); padding: 18px; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15px; }

/* ---------- Feed ---------- */

.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.feed-head h1, .feed-head h2 { font-size: 22px; letter-spacing: -.025em; font-weight: 800; margin: 0; }
.tabs { display: flex; gap: 2px; }
.tabs a { padding: 5px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a[aria-current] { background: var(--soft); color: var(--ink); }

.rows { list-style: none; margin: 0 -12px; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); }
.row:hover { background: var(--soft); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: inherit; }
.row-main:hover { text-decoration: none; }
.row-text { display: grid; gap: 1px; min-width: 0; }
.row-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.row-main:hover .row-title { color: var(--accent); }
.rank { font-weight: 500; color: var(--muted); }
.row-tagline { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); margin-top: 3px; }
.row-meta b { font-weight: 700; }

.v-pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--v); font-size: 13px; white-space: nowrap; }
.v-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--soft); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; }
a.chip:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.row:hover .chip { background: #fff; }

.more { margin: 14px 0 0; display: flex; gap: 20px; font-weight: 600; font-size: 15px; }
.empty { padding: 24px 0; color: var(--muted); }

/* ---------- Rating shields, avatars, trust vote ---------- */

.rating { display: inline-flex; gap: 2px; vertical-align: middle; }
.rating svg { width: auto; }
.rating-s svg { height: 14px; }
.rating-m svg { height: 20px; }
.rating-l svg { height: 24px; }

.avatar { flex: none; }
.avatar-s { width: 26px; height: 26px; }
.avatar-m { width: 36px; height: 36px; }
.avatar-l { width: 46px; height: 46px; }
.avatar-xl { width: 72px; height: 72px; }

.trust { margin: 0; flex: none; }
.trust button[type=submit] { display: grid; justify-items: center; gap: 2px; width: 50px; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.trust svg { height: 18px; width: auto; fill: none; stroke: var(--ink); stroke-width: 18; stroke-linejoin: round; }
.trust button[type=submit]:hover { border-color: var(--accent); color: var(--accent); }
.trust button[type=submit]:hover svg { stroke: var(--accent); }
.trust.is-on button[type=submit] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.trust.is-on svg { fill: var(--accent); stroke: var(--accent); }

/* Company page: the vote as a labelled button. Fixed width, so the label change never moves the layout. */
.trust-full { display: flex; align-items: center; gap: 12px; }
.trust-full button[type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 148px; height: 38px; padding: 0; border-radius: 999px; font-size: 15px; }
.trust-full button[type=submit] svg { height: 18px; }
.trust-full.is-on button[type=submit] { background: var(--accent); border-color: var(--accent); color: #fff; }
.trust-full.is-on button[type=submit] svg { fill: #fff; stroke: #fff; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.link-btn:hover { color: var(--ink); }

/* ---------- Home sidebar ---------- */

.latest { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.latest a { display: grid; gap: 2px; color: inherit; }
.latest a:hover { text-decoration: none; }
.latest a:hover b { color: var(--accent); }
.latest-top { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.latest-text { font-size: 15px; }
.latest-by { font-size: 13px; color: var(--muted); }

.ticks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.ticks li { padding-left: 24px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* ---------- Company page ---------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a::after { content: "/"; margin-left: 8px; color: var(--empty); }

.flash { background: #e3f6ee; color: #07553b; padding: 10px 14px; border-radius: var(--r-m); font-weight: 500; }
.error { background: #fdecea; color: var(--bad); padding: 10px 14px; border-radius: var(--r-m); font-weight: 500; }

.biz { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.biz-id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 20px; align-items: center; }
.biz-tagline { font-size: 17px; color: var(--muted); margin: 4px 0 8px; }
.biz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 15px; font-weight: 500; }
.biz-actions { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }

/* Claim status: a button that opens a short explanation (native popover, no script). */
.claim { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.claim svg { width: 18px; height: 18px; }
.claim path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.claim-yes { color: var(--ok); }
.claim-yes circle { fill: var(--ok); }
.claim-no { color: var(--warn); }
.claim-no circle { fill: #d18a00; }
.claim:hover { text-decoration: underline; }

.pop { border: 0; border-radius: var(--r-l); padding: 22px 24px; width: min(420px, calc(100vw - 32px)); color: var(--text); box-shadow: 0 20px 60px -20px rgba(18, 23, 53, .45); }
.pop::backdrop { background: rgba(18, 23, 53, .3); }
.pop h2 { font-size: 20px; letter-spacing: -.02em; }
.pop-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-weight: 600; }

/* The verdict: one coloured tile that answers "can I trust it?" before any number. */
.score-tile { background: var(--v); color: #fff; border-radius: var(--r-l); padding: 18px 20px; display: grid; gap: 12px; }
.verdict { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: -.015em; }
.verdict b { color: #fff; font-weight: 800; }
.v-icon { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: #fff; fill: none; stroke: var(--v); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.score-line { display: flex; align-items: center; gap: 12px; }
.score-num { font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -.045em; }
.score-count { display: block; margin-top: 3px; font-size: 14px; opacity: .92; }
.score-note { margin: 0; font-size: 14px; line-height: 1.4; opacity: .95; }
.score-trust { display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 14px; }
.score-trust svg { flex: none; height: 18px; width: auto; fill: #fff; }
.score-trust b { color: #fff; font-size: 16px; font-weight: 800; }
.score-tile .f-accent { fill: #fff; }
.score-tile .f-white { fill: var(--v); }
.score-tile .f-empty { fill: rgba(255, 255, 255, .32); }
.score-tile .s-accent { stop-color: #fff; }
.score-tile .s-empty { stop-color: rgba(255, 255, 255, .32); }

/* Rating breakdown (sidebar): each row is a link that filters the reviews. */
.dist { display: grid; gap: 0; margin: 0 -8px; }
.dist a { display: grid; grid-template-columns: 50px minmax(0, 1fr) 36px; align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--r-s); color: var(--muted); font-size: 14px; }
.dist a:hover { background: var(--soft); text-decoration: none; color: var(--ink); }
.dist a[aria-current] { background: var(--accent-soft); color: var(--ink); }
.dist-label { font-weight: 600; color: var(--ink); }
.dist-pct { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 10px; }
.filter-note { font-size: 15px; color: var(--muted); }

.review { padding: 20px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.review:target { background: var(--accent-soft); margin: 0 -14px; padding: 20px 14px; border-radius: var(--r-m); border-top-color: transparent; }
.review-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-head > div { display: grid; gap: 2px; }
.review-head time { font-size: 14px; color: var(--muted); }
.review-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.review-body { white-space: pre-line; margin: 0 0 8px; max-width: 68ch; }
.review-when { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.review footer { font-size: 14px; }
.review footer a { color: var(--muted); }

.tag { font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag-ok { background: #e3f6ee; color: var(--ok); }
.tag-warn { background: #fff1d6; color: var(--warn); }
.tag-demo { background: #fff6d6; color: #5c4400; vertical-align: middle; letter-spacing: 0; }

.reply { background: var(--soft); border-radius: var(--r-m); padding: 12px 14px; margin: 0 0 8px; font-size: 15px; }
.reply time { color: var(--muted); font-size: 13px; }
.reply p { margin: 4px 0 0; }

.facts { margin: 10px 0 0; display: grid; gap: 6px; font-size: 15px; }
.facts div { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.badge-preview { display: block; width: 104px; height: auto; margin: 4px 0 14px; }

.block { margin-top: 40px; }
.block > h2 { font-size: 20px; letter-spacing: -.02em; font-weight: 800; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { margin: 0 0 14px; max-width: 64ch; }

/* ---------- Badge collection ---------- */

.badge-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.badge-card { border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px 16px; display: grid; grid-template-rows: auto auto 1fr auto auto; }
.badge-card h2 { margin: 14px 0 2px; }
.badge-card p { color: var(--muted); font-size: 15px; }
.badge-stage { display: grid; place-items: center; height: 200px; border-radius: var(--r-m); background: var(--soft); overflow: hidden; }
.badge-stage-tint { background: var(--accent-soft); }
.badge-stage img { max-width: 86%; max-height: 84%; width: auto; height: auto; object-fit: contain; }
.badge-card .btn { justify-self: start; }
.code { display: grid; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.code textarea { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px; resize: vertical; width: 100%; }

/* ---------- Forms and text pages ---------- */

.narrow { max-width: 600px; margin: 0 auto; }
.center { text-align: center; padding: 40px 0; }
.lead { font-size: 17px; color: var(--muted); margin: 8px 0 20px; }
.narrow h2 { margin-top: 28px; }

.form { display: grid; gap: 16px; margin-top: 20px; }
.form label, .form legend { display: grid; gap: 5px; font-weight: 600; font-size: 15px; color: var(--ink); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.form input:not([type=radio], [type=checkbox]), .form textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); width: 100%; border: 1px solid var(--empty); border-radius: var(--r-m); padding: 10px 12px; background: #fff; }
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .btn { justify-self: start; }
.form .check { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; font-weight: 400; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.hint { font-size: 14px; color: var(--muted); margin: -6px 0 0; }
.field-error { color: var(--bad); font-size: 14px; font-weight: 500; }
.hp { position: absolute; left: -5000px; }

.write-biz { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 16px; }
.write-biz span { display: grid; }
.write-biz:hover { text-decoration: none; }

/* Rating picker: plain radio buttons drawn as shields. Every shield up to the chosen one fills. */
.pick-row { display: flex; gap: 6px; }
.pick-row label { cursor: pointer; display: block; position: relative; }
.pick-row input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick-row svg { height: 44px; width: auto; }
.pick-row path { fill: var(--empty); }
.pick-row polygon { fill: #fff; }
.pick-row label:has(input:checked) path,
.pick-row label:has(~ label input:checked) path { fill: var(--accent); }
.pick-row:hover label path { fill: var(--empty); }
.pick-row label:hover path,
.pick-row label:has(~ label:hover) path { fill: var(--accent-dark); }
.pick-row label:has(input:focus-visible) svg { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.quote { margin: 16px 0; padding: 14px 16px; background: var(--soft); border-radius: var(--r-m); display: grid; gap: 6px; }
.quote p { margin: 0; }
.quote cite { font-size: 14px; color: var(--muted); font-style: normal; }

.prose h2 { font-size: 19px; margin: 26px 0 6px; }
.prose p { max-width: 62ch; }
.rules { padding-left: 22px; display: grid; gap: 8px; max-width: 62ch; }

.cat-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cat-grid a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-l); color: inherit; }
.cat-grid a:hover { border-color: var(--accent); text-decoration: none; }
.cat-grid span { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 15px; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot p { margin: 8px 0 0; color: var(--muted); max-width: 34ch; }
.foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; align-content: start; }
.foot nav a { color: var(--text); font-weight: 500; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .top-nav a:not(.btn) { display: none; }
  .biz { grid-template-columns: 1fr; gap: 20px; }
  .search-off { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .top-in { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .avatar-xl { width: 56px; height: 56px; }
  .form-2 { grid-template-columns: 1fr; }
  .row-meta .chip { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .row, .trust button, .btn, .dist a, .cat-grid a { transition: background-color .12s, border-color .12s, color .12s; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- Badge collection page ---------- */
.badge-page h2 { font-size: 20px; letter-spacing: -.02em; font-weight: 800; margin: 36px 0 2px; }
.badge-page h2 + .muted { margin-bottom: 14px; font-size: 15px; }
.badge-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; counter-reset: step; font-size: 15px; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.steps b { margin-right: -4px; }
.bg-pick { display: flex; align-items: center; gap: 4px; border: 0; margin: 0; padding: 0; font-size: 14px; }
.bg-pick legend { float: left; margin-right: 8px; padding: 0; color: var(--muted); }
.bg-pick label { position: relative; padding: 4px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.bg-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bg-pick label:hover { color: var(--ink); }
.bg-pick label:has(input:checked) { background: var(--ink); color: #fff; }
.bg-pick label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.badge-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 0; }
.badge-card { border: 0; padding: 0; display: grid; grid-template-rows: auto auto 1fr auto auto; justify-items: start; }
.badge-card h3 { margin: 12px 0 2px; font-size: 16px; }
.badge-card p { margin: 0 0 12px; }
.badge-size { white-space: nowrap; font-size: 13px; opacity: .8; }
/* The image is pinned inside the stage, so no badge proportion can spill out of it. */
.badge-stage { position: relative; width: 100%; height: 190px; display: block; }
.badge-stage img { position: absolute; inset: 14%; width: 72%; height: 72%; max-width: none; max-height: none; object-fit: contain; }
.badge-page:has(#bg-dark:checked) .badge-stage { background: #121735; }
.badge-page:has(#bg-colour:checked) .badge-stage { background: #ffe2b8; }
.code-details { margin-top: 10px; width: 100%; font-size: 14px; }
.code-details summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.code-details summary:hover { color: var(--ink); }
.code-details textarea { display: block; margin-top: 8px; width: 100%; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px; resize: vertical; }
.badge-page .ticks { max-width: 62ch; margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) { .badge-stage { transition: background-color .15s; } }

/* ---------- Trust karma ---------- */
.karma { flex: none; }
.karma-open { display: grid; justify-items: center; gap: 2px; width: 52px; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.karma-open svg { height: 18px; width: auto; fill: none; stroke: currentColor; stroke-width: 18; stroke-linejoin: round; }
.karma-open:hover { border-color: var(--ink); }
.karma.is-neg .karma-open { color: #c0321f; }
.karma.is-up .karma-open { border-color: #0a7d52; background: #e2f5ec; color: #0a7d52; }
.karma.is-up .karma-open svg { fill: currentColor; }
.karma.is-down .karma-open { border-color: #c0321f; background: #fde8e4; color: #c0321f; }
.karma.is-down .karma-open svg { fill: currentColor; }

/* Company page: the same box as a labelled pill. */
.karma-full .karma-open { display: inline-flex; align-items: center; gap: 8px; width: auto; height: 38px; padding: 0 16px 0 12px; border-radius: 999px; font-size: 15px; }
.karma-label { font-weight: 600; }

.pop-vote { text-align: left; }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.vote-btn { display: grid; justify-items: center; gap: 6px; padding: 16px 10px 12px; border: 1.5px solid var(--v); border-radius: var(--r-l); background: #fff; color: var(--v); font: inherit; cursor: pointer; }
.vote-btn b { color: inherit; font-size: 16px; }
.vote-btn span { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .85; }
.vote-btn svg { height: 40px; width: auto; }
.vi-shield { fill: var(--v); }
.vi-sign { fill: none; stroke: #fff; stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; }
.vote-btn:hover { background: var(--v-soft); }
.vote-btn[aria-pressed="true"] { background: var(--v); color: #fff; }
.vote-btn[aria-pressed="true"] .vi-shield { fill: #fff; }
.vote-btn[aria-pressed="true"] .vi-sign { stroke: var(--v); }
@media (prefers-reduced-motion: no-preference) { .karma-open, .vote-btn { transition: background-color .12s, border-color .12s, color .12s; } }
