@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  --bg: #e8ecf0;  /* muted text 4.9:1, links 5.3:1 */
  --surface: #ffffff;
  --ink: #1b2a41;
  --muted: #5b6676;
  --line: #d5dbe3;
  --red: #d62f33;  /* white text 4.9:1, AA at any size */
  --red-ink: #c92a2d;
  --amber: #f2b705;
  --grey: #6b7480;  /* white text 4.7:1 */
  --blue: #2f6fed;
  --blue-on-bg: #2559c9;
  --r-hero: 20px;
  --r-panel: 14px;
  --r-control: 10px;
  --r-thumb: 8px;
  --wide: 120%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-stretch: 100%;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue-on-bg); text-underline-offset: 2px; }
.scanner a, .panel a, .row a, .example a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.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;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--r-control); }
.skip:focus { left: 8px; z-index: 10; }

h1, h2, .wordmark, .sticker, .step-n {
  font-stretch: var(--wide);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(30px, 7vw, 52px); line-height: 1.05; font-weight: 800; margin: 0 0 12px; max-width: 16ch; }
h2 { font-size: clamp(24px, 4.5vw, 32px); line-height: 1.15; font-weight: 750; margin: 0 0 6px; }
.lede, .section-lede { color: var(--muted); max-width: 62ch; margin: 0; }

/* layout */
header.site, main, footer.site { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
header.site { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.mark { width: 30px; height: 30px; display: block; flex: none; }  /* the peeling-sticker mark (static/brand/mark.svg) */
.wordmark { font-size: 22px; font-weight: 800; }
.gh { font-weight: 600; }

section { margin-top: 56px; }
.hero { margin-top: 8px; }
.intro { padding: 8px 0 20px; }

/* scanner panel */
.scanner {
  background: var(--surface);
  border-radius: var(--r-hero);
  padding: 20px;
  border: 1px solid var(--line);
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.step-n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--ink); font-weight: 800; font-size: 17px;
}
.step-title { display: block; font-weight: 700; margin: 4px 0 8px; }
.optional { font-weight: 400; color: var(--muted); }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; cursor: pointer;
  border: 2px dashed #b7c0cb; border-radius: var(--r-panel); background: #f7f9fb;
  padding: 18px; overflow: hidden;
}
.drop-main { min-height: 220px; }
.drop-label { min-height: 120px; }
.drop:hover, .drop.over { border-color: var(--blue); background: #f2f6ff; }
.drop:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.drop-text { display: grid; gap: 4px; max-width: 34ch; }
.drop-text span { color: var(--muted); font-size: 15px; }
.drop.has-file { border-style: solid; border-color: var(--line); padding: 10px; }
.drop.has-file .drop-text { display: none; }
.preview { width: 100%; height: 200px; object-fit: contain; border-radius: var(--r-thumb); }
.drop-label .preview { height: 100px; }
.has-file::after {
  content: "Change photo"; position: absolute; right: 10px; bottom: 10px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-control); padding: 4px 10px;
}

.invite { margin-top: 22px; display: grid; gap: 6px; max-width: 460px; }
.invite label { font-weight: 700; }
input[type=text], input[type=search] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid #aeb8c4; border-radius: var(--r-control); padding: 10px 12px; min-height: 46px; width: 100%;
}
input[aria-invalid=true] { border-color: var(--red-ink); }
.hint { margin: 0; color: var(--muted); font-size: 15px; }
#photoErr { margin-top: 8px; }
.field-error, .form-error { margin: 0; color: var(--red-ink); font-weight: 600; font-size: 15px; }
.form-error { margin-top: 12px; }

.submit-row { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
button { font: inherit; cursor: pointer; }
.primary {
  background: var(--blue); color: #fff; border: 0; border-radius: var(--r-control);
  padding: 12px 22px; min-height: 48px; font-weight: 700;
}
.primary:hover { background: #2559c9; }
.primary[disabled] { opacity: 0.6; cursor: progress; }
.secondary {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--r-control);
  padding: 10px 18px; min-height: 46px; font-weight: 600;
}
.secondary:hover { background: var(--surface); }
.privacy { margin: 0; color: var(--muted); font-size: 15px; max-width: 40ch; }
.policy { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 66ch; }
.policy summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.policy p { margin: 8px 0 0; }

/* result */
.result { margin-top: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.verdict { display: grid; gap: 20px; }
.shot { position: relative; width: min(100%, 360px); }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-panel); background: #dfe4ea; }
/* Stickers: about a quarter of the photo's width, overlapping its top-right corner edge so the item stays visible.
   Text scales with the photo (container units); white on #D62F33 and #6B7480 meets AA at any size. */
.shot { container-type: inline-size; }
.sticker {
  position: absolute; top: -6%; right: -6%; width: max(64px, 26%); aspect-ratio: 1; height: auto; border-radius: 50%;
  display: grid; place-items: center; text-align: center; padding: 4%;
  font-weight: 800; font-size: max(12px, 4.4cqw); line-height: 1.02; font-stretch: 108%;
  overflow-wrap: normal; word-break: keep-all;
  box-shadow: 0 2px 0 rgba(27, 42, 65, 0.18), 0 6px 14px rgba(27, 42, 65, 0.18);
  transform: rotate(-8deg);
}
.sticker.small { top: -6%; right: -6%; }
.s-CONFIRMED { background-color: var(--red); color: #fff; }
.s-POSSIBLE { background-color: var(--amber); color: var(--ink); }
.s-NOMATCH { background-color: var(--grey); color: #fff; }
.slap { animation: slap 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes slap { from { transform: scale(1.6) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slap { animation: none; } * { scroll-behavior: auto !important; } }

.verdict-copy h2 { margin-bottom: 8px; }
.verdict-copy p { margin: 0 0 8px; max-width: 62ch; }
.muted { color: var(--muted); }

.recall {
  display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; }
.pair figure, .strip figure { margin: 0; }
.pair img, .strip img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f3f5f8; border-radius: var(--r-thumb); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }
.recall h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.codes { font-weight: 700; }

.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.strip a { font-size: 15px; line-height: 1.3; display: block; margin-top: 6px; }
.closest { background: #f3f5f8; border-radius: var(--r-panel); padding: 16px; margin-top: 8px; }
.closest img { filter: saturate(0.55); }

.loading { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; min-height: 120px; }
.pulse { width: 44px; height: 44px; border-radius: 50%; background: var(--grey); }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 1.2s ease-in-out infinite; } }
@keyframes pulse { 50% { transform: scale(0.82); } }
.loading p { margin: 0; }
.wake { margin-top: 6px; font-size: 15px; color: var(--muted); }
.notice { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.notice .dot { width: 44px; height: 44px; border-radius: 50%; background: var(--grey); }
.notice p { margin: 0; }

/* lookup */
.lookup-form { display: flex; gap: 8px; margin-top: 16px; max-width: 640px; }
.lookup-form input { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 15px; min-height: 36px;
}
.chip:hover { border-color: var(--ink); }
.check { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 15px; }
.check input { width: 18px; height: 18px; }
.lookup-out { margin-top: 16px; display: grid; gap: 1px; background: var(--line); border-radius: var(--r-panel); overflow: hidden; }
.lookup-out:empty { display: none; }
.row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 12px 14px; background: var(--surface); }
.row img, .row .noimg { width: 64px; height: 64px; object-fit: contain; background: #f3f5f8; border-radius: var(--r-thumb); }
.row h3 { font-size: 16px; line-height: 1.3; margin: 0 0 2px; font-weight: 650; }
.row p { margin: 0; font-size: 15px; color: var(--muted); }
.lookup-msg { padding: 14px; background: var(--surface); margin: 0; }

/* examples */
.gallery { margin-top: 20px; display: grid; gap: 16px; }
.example { background: var(--surface); border-radius: var(--r-panel); border: 1px solid var(--line); padding: 16px; display: grid; gap: 14px; align-content: start; }
.example .shot { width: min(100%, 300px); }
.example .label-thumb { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.example .label-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-thumb); }
.example h3 { font-size: 17px; line-height: 1.3; margin: 0 0 4px; font-weight: 700; }
.example p { margin: 0 0 4px; font-size: 15px; }
.kind { color: var(--muted); }

footer.site { margin-top: 72px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer.site p { margin: 0 0 6px; max-width: 70ch; }

@media (min-width: 640px) {
  .strip { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery[data-set=sample] .example:first-child { grid-column: 1 / -1; grid-template-columns: 300px 1fr; align-items: start; }
}
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: start; }
  .intro { padding-top: 40px; position: sticky; top: 20px; }
  .scanner { padding: 28px; }
  .verdict { grid-template-columns: 360px 1fr; align-items: start; column-gap: 44px; }
  .recall { grid-column: 1 / -1; grid-template-columns: 520px 1fr; align-items: start; }
  .recall.wide { grid-template-columns: 1fr; }
  .strip { gap: 16px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* batch */
.batch-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; margin-top: 16px; display: grid; gap: 14px; }
.drop-batch { min-height: 120px; }
.thumbs-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.thumbs-row:empty { display: none; }
.thumbs-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-thumb); }
.batch-form .submit-row { margin-top: 0; }
.batch-out { margin-top: 16px; }
.batch-out:empty { display: none; }
.summary { margin: 0 0 12px; font-weight: 700; }
.report { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-panel); overflow: hidden; }
.report .item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 12px 14px; background: var(--surface); align-items: start; }
.report .item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-thumb); }
.report .item p { margin: 2px 0 0; font-size: 15px; }
.report .item a { color: var(--blue); }
.tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.tag::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.t-CONFIRMED::before { background: var(--red); }
.t-POSSIBLE::before { background: var(--amber); }
.t-NOMATCH::before { background: var(--grey); }
.report-actions { margin-top: 12px; }
@media (min-width: 640px) { .thumbs-row { grid-template-columns: repeat(10, 1fr); } }

/* samples */
.samples { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.samples-title { margin: 0 0 10px; font-weight: 700; }
.sample-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sample { display: grid; gap: 6px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-control); font-size: 14px; text-align: left; }
.sample:hover { border-color: var(--blue); }
.sample img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.sample span { padding: 0 2px 2px; line-height: 1.25; }
.credit { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* invite request */
.invite-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; margin-top: 16px; display: grid; gap: 10px; max-width: 720px; }
.invite-form > label:first-child { font-weight: 700; }
.invite-form input[type=email] { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid #aeb8c4; border-radius: var(--r-control); padding: 10px 12px; min-height: 46px; max-width: 460px; }
.invite-form .check { color: var(--ink); margin-top: 4px; align-items: flex-start; }
.invite-form .consent { font-size: 15px; color: var(--muted); }
.invite-form .check input { margin-top: 3px; flex: none; }
.cats { border: 1px solid var(--line); border-radius: var(--r-control); padding: 10px 14px; margin: 0; }
.cats legend { font-weight: 700; padding: 0 4px; }
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 2px 16px; }
.cat-grid .check { margin-top: 6px; font-size: 15px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { margin: 0; font-weight: 600; color: var(--ink); }
@media (min-width: 640px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* hero proof + short recall card (shared card format) */
.proof { margin: 20px 0 0; display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px; }
.proof-shot { width: 132px; }
.proof-shot img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-thumb); }
.proof .sticker { width: 70px; font-size: 12px; font-stretch: 100%; top: -10px; right: -12px; padding: 2px; }
.rcard { color: var(--ink); margin: 0; font-size: 15px; }
.rcard p { margin: 0 0 4px; font-size: 15px; line-height: 1.4; }
.rcard-kicker { color: var(--muted); font-size: 13px !important; }
.rcard-title { font-size: 18px; line-height: 1.25; margin: 0 0 6px; font-stretch: 105%; }
.hazard { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  border: 1.5px solid var(--ink); margin-right: 6px; }
.small { font-size: 14px; }
.intro .lede { margin-top: 16px; }
@media (min-width: 900px) { .proof { grid-template-columns: 170px 1fr; } .proof-shot { width: 170px; } }

/* short recall cards everywhere: headings are not links */
.rcard-title { color: var(--ink); }
.recall .rcard-title, .row .rcard-title { font-size: 18px; }
.rcard.compact .rcard-title { font-size: 15px; line-height: 1.3; margin: 6px 0 4px; font-stretch: 100%; }
.rcard.compact p { font-size: 14px; }
.strip .rcard { margin-top: 2px; }
.row .rcard-title { margin-top: 0; }

/* sharing */
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.shared { margin-top: 8px; }
.shared-body { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; margin-top: 6px; }
.shared-body img { width: 120px; aspect-ratio: 1; object-fit: contain; background: #f3f5f8; border-radius: var(--r-thumb); }
@media (min-width: 640px) { .shared-body { grid-template-columns: 180px 1fr; } .shared-body img { width: 180px; } }

/* how it works */
.how-grid { display: grid; gap: 14px; margin-top: 14px; }
.how-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px; }
.how-grid h3 { margin: 0 0 6px; font-size: 18px; }
.how-grid p { margin: 0 0 8px; font-size: 16px; }
.how-grid p:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.rcard p.small { display: flex; flex-wrap: wrap; gap: 2px 14px; }

.legal { margin: 0 0 4px; font-weight: 600; font-size: 17px; }
.legal a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* example label in the empty label drop zone */
.drop-example { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-align: left; max-width: 420px; }
.example-label { width: 96px; height: 96px; object-fit: cover; object-position: center 88%; border-radius: var(--r-thumb); }
.drop-example > span { display: grid; gap: 4px; }
.data-line { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* form controls in the design tokens */
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 18px; height: 18px; }
input[type=text]:focus-visible, input[type=search]:focus-visible, input[type=email]:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.sample:focus-visible, .chip:focus-visible, .drop:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }

/* buyer lane */
.buyer { margin: 14px 0 0; font-size: 17px; }
.ask { margin-top: 14px; display: grid; gap: 8px; justify-items: start; }
.ask p { margin: 0; }
.ask-msg { font-size: 15px; color: var(--muted); }
.lane { display: inline-block; margin: 0 0 6px; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  border: 1.5px solid var(--blue); color: var(--blue-on-bg); }
@media (min-width: 900px) { .gallery[data-set=curated] { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .gallery[data-set=curated] { grid-template-columns: repeat(4, 1fr); } }
.example .sticker { width: 78px; font-size: 12px; font-stretch: 100%; padding: 2px; }

/* stats page (private) and feedback */
.stats { padding-top: 24px; padding-bottom: 40px; }
.table-wrap { overflow-x: auto; margin: 12px 0 16px; }
.results { border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.results th, .results td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.funnel li { margin: 4px 0; }
.helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.helpful .secondary { min-height: 38px; padding: 6px 16px; }

.camera { display: inline-block; margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--blue); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.camera:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.policy .plain { margin: 8px 0 0; padding-left: 20px; }
.policy .plain li { margin: 4px 0; }

/* ===== Final polish: one spacing scale, tabs, compact hero ===== */
:root { --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 40px; --space-5: 64px; }
main > section { margin-top: var(--space-5); }
main > section.hero { margin-top: var(--space-1); }
main > section.result { margin-top: var(--space-3); }
main > section.shared { margin-top: var(--space-2); }
@media (max-width: 640px) { main > section { margin-top: var(--space-4); } }

.intro { padding: 4px 0 var(--space-3); }
.intro h1 { margin-bottom: var(--space-1); }
.tagline { margin: 0; font-size: 19px; line-height: 1.4; max-width: 34ch; }
.subline { margin: var(--space-1) 0 0; font-size: 15px; }
.subline a { color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .tagline { font-size: 17px; }
  .scanner { padding: var(--space-2); }
  .drop-main { min-height: 132px; }
}
@media (min-width: 900px) { .intro { padding-top: var(--space-4); } }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: var(--space-2); background: var(--bg); border-radius: 12px; }
.tabs [role=tab] { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600;
  font-size: 15px; padding: 10px 8px; border-radius: 9px; min-height: 44px; cursor: pointer; }
.tabs [role=tab][aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27, 42, 65, 0.12); }
.tabs [role=tab]:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
#panelHaul .hint { margin-top: var(--space-1); }

/* samples sit under step 1 */
.samples { border-bottom: 0; padding-bottom: 0; margin: var(--space-2) 0 0; }
.samples-title { font-size: 15px; margin-bottom: var(--space-1); }
.sample { position: relative; }
.sample.is-loading::after { content: ""; position: absolute; inset: 6px 6px auto 6px; aspect-ratio: 4 / 3;
  border-radius: 6px; background: rgba(255, 255, 255, 0.55) center / 28px 28px no-repeat; }
.sample.is-loading::before { content: ""; position: absolute; z-index: 1; left: calc(50% - 14px); top: 28px; width: 24px; height: 24px;
  border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .sample.is-loading::before { animation: spin 0.8s linear infinite; } }

/* compact invite code */
details.invite { margin-top: var(--space-2); }
details.invite summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 15px; width: fit-content; }
details.invite input { margin-top: var(--space-1); max-width: 320px; }
details.invite .hint { margin-top: 6px; }

/* button row + legend */
.submit-row { margin-top: var(--space-2); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.d-CONFIRMED { background: var(--red); }
.d-POSSIBLE { background: var(--amber); }
.d-NOMATCH { background: var(--grey); }
.privacy { margin-top: var(--space-2); max-width: none; }

/* results: the sticker carries the verdict */
.verdict-copy .lead { font-size: 19px; line-height: 1.45; margin: 0 0 var(--space-1); }
.batch-report .summary { margin-bottom: var(--space-2); }

/* quieter links and secondary controls: underline only inline links in body copy */
.camera { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border: 1.5px solid var(--line);
  border-radius: var(--r-control); color: var(--ink); text-decoration: none; font-size: 14px; background: var(--surface); }
.camera:hover { border-color: var(--ink); }
.linkbtn, .rcard .small a, .policy summary { text-decoration: none; }
.linkbtn:hover, .rcard .small a:hover { text-decoration: underline; }

/* compact invite request panel */
.invite-req .invite-form { margin-top: 0; max-width: 680px; }
.invite-form h2 { margin: 0; }
.invite-row { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.invite-row input[type=email] { flex: 1 1 220px; max-width: none; }
@media (max-width: 420px) { .tabs [role=tab] { font-size: 14px; padding: 8px 4px; white-space: nowrap; letter-spacing: -0.01em; } }

/* lean scanner */
.subline { margin-top: var(--space-1); }
.samples-title { color: var(--muted); font-weight: 600; }
.sample { padding: 4px; }
.drop-main { min-height: 150px; }
@media (max-width: 640px) { .drop-main { min-height: 120px; } }
.step:has(.addlabel:not([hidden])) { align-items: center; }
.addlabel { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; text-align: left; }
.addlabel .optional { font-weight: 400; }
details.invite summary { list-style: none; }
details.invite summary::-webkit-details-marker { display: none; }
.privacy a { color: var(--muted); }
.policy { margin-top: var(--space-1); }

/* checking state on the clicked control */
.primary.is-busy { opacity: 1; cursor: progress; }
.primary.is-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .primary.is-busy::before { animation: spin 0.8s linear infinite; } }
.sample.is-loading::after { content: "Checking..."; inset: 4px; aspect-ratio: auto; display: grid; place-items: end center;
  padding-bottom: 10px; background: rgba(255, 255, 255, 0.72); font-weight: 700; font-size: 14px; color: var(--ink); border-radius: 6px; }
.sample.is-loading::before { top: calc(50% - 22px); }
.sample.is-loading { opacity: 1; }
#result { scroll-margin-top: 12px; }

.remove-label { margin-top: 8px; font-size: 14px; color: var(--muted); text-decoration: underline; }
.inline-label { margin: 12px 0 4px; display: grid; gap: 6px; justify-items: start; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.file-btn.is-busy { cursor: progress; opacity: 0.8; }
.inline-label p { margin: 0; }

/* next steps after Recalled */
.next { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-control); background: #f7f9fb; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg); border-radius: 10px; margin-bottom: 10px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted);
  padding: 8px 14px; border-radius: 8px; min-height: 40px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27, 42, 65, 0.12); }
.next p { margin: 0 0 6px; }
.next-h { font-weight: 700; font-size: 18px; }
.sample span { display: block; padding: 4px 2px 2px; font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2; }
@media (max-width: 640px) { .drop-main { min-height: 96px; } .steps { gap: 14px; } }
.verdict > .helpful { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }

/* report */
.report-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.print-report { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(main), main > *:not(#printReport), .skip { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-report { display: block !important; margin: 0; font-size: 12pt; color: #000; }
  .print-report h1 { font-size: 20pt; margin: 0 0 4pt; }
  .print-report table { width: 100%; border-collapse: collapse; margin-top: 10pt; }
  .print-report th, .print-report td { border-bottom: 1px solid #999; padding: 6pt; text-align: left; vertical-align: top; }
  .print-report img { width: 72pt; height: 72pt; object-fit: cover; }
  .print-report .name { font-size: 9pt; color: #444; }
  .print-report .url { font-size: 9pt; color: #444; word-break: break-all; }
  .print-report .fine { font-size: 9pt; color: #444; margin-top: 12pt; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.doc { max-width: 720px; padding-top: 8px; padding-bottom: 24px; }
.doc h1 { margin: 16px 0 4px; max-width: none; }
.doc h2 { font-size: 21px; margin: 28px 0 6px; }
.doc p, .doc li { max-width: 66ch; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.updated { color: var(--muted); font-size: 15px; margin-top: 0; }

/* phones: a big camera button and a library link instead of the drop zone */
.mobile-pick { display: none; }
@media (max-width: 767px) {
  #dropPhoto:not(.has-file) { display: none; }
  .mobile-pick { display: grid; gap: 10px; justify-items: start; }
  .step-body:has(#dropPhoto.has-file) .mobile-pick { display: none; }
  .take { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; border-radius: var(--r-control);
    border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 18px; cursor: pointer; }
  .take:focus-within, .choose:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .choose { color: var(--blue); font-weight: 600; font-size: 16px; cursor: pointer; padding: 4px 0; }
}
@media (max-width: 767px) { .mobile-pick { gap: 4px; } .take { min-height: 60px; } }

h1 { text-wrap: balance; }
.header-link { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.header-link:hover { text-decoration: underline; }
#lookup { scroll-margin-top: 16px; }
.what-we-store { font-size: 14px; color: var(--muted); margin-top: -2px; }
.what-we-store summary { cursor: pointer; color: var(--blue); font-weight: 600; width: fit-content; }
.what-we-store p { margin: 6px 0 0; max-width: 62ch; }
@media (max-width: 400px) { .header-link { font-size: 14px; } }
@media (max-width: 400px) { header.site { gap: 10px; } .wordmark { font-size: 19px; } .header-link { font-size: 13px; text-align: right; } }

/* compact footer */
footer.site { padding-top: var(--space-3); padding-bottom: var(--space-4); }
footer.site .footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
footer.site .footer-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
footer.site .footer-links a:hover { text-decoration: underline; }
footer.site .fine { font-size: 13px; color: var(--muted); margin: 0; max-width: 80ch; }
footer.site .fine a { color: var(--muted); }

/* model number tab */
#panelModel input[type=search] { width: 100%; min-height: 52px; font-size: 18px; }
#panelModel .hint { margin: 10px 0 0; }
#panelModel .chips { margin-top: 8px; }
.tabs [role=tab] { padding-left: 4px; padding-right: 4px; }
.lookup-out { margin-top: 0; }

/* slim bar after the scanner scrolls away */
.minibar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: rgba(232, 236, 240, 0.96);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.minibar-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.minibar .wordmark { font-size: 18px; }
.minibar .mark { width: 26px; height: 26px; }
.minibar-btn { min-height: 40px; padding: 8px 16px; font-size: 15px; }
@media (prefers-reduced-motion: no-preference) { .minibar:not([hidden]) { animation: barin 180ms ease-out; } }
@keyframes barin { from { transform: translateY(-100%); } to { transform: none; } }
#result, #invite-request { scroll-margin-top: 72px; }
.invite-prompt { grid-column: 1 / -1; margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.notfound { min-height: 50vh; }
.home-btn { display: inline-flex; align-items: center; text-decoration: none; margin-top: 8px; }

.closest-toggle { display: block; border-top: 1px solid var(--line); padding-top: 14px; }
.closest-toggle summary { cursor: pointer; color: var(--blue); font-weight: 600; width: fit-content; list-style: none; }
.closest-toggle summary::-webkit-details-marker { display: none; }
.closest-toggle summary::before { content: "+ "; }
.closest-toggle[open] summary::before { content: "− "; }
.closest-toggle .when-open, .closest-toggle[open] .when-closed { display: none; }
.closest-toggle[open] .when-open { display: inline; }
.closest-toggle .closest { margin-top: 12px; }

@media print { .print-report h1 { display: flex; align-items: center; gap: 8pt; } .print-report .print-mark { width: 22pt; height: 22pt; } }

.busy-note { align-items: start; }
.busy-note p { margin: 0 0 8px; }
.busy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
