:root {
  color-scheme: light;
  --bg: #f5f7f3;
  --surface: #ffffff;
  --text: #18201b;
  --muted: #637067;
  --border: #dfe5df;
  --green: #0f5132;
  --green-2: #176a43;
  --green-soft: #dff3e8;
  --red: #a22c2c;
  --red-soft: #fde7e7;
  --amber: #8a5b00;
  --amber-soft: #fff3cd;
  --grey-soft: #edf0ed;
  --shadow: 0 12px 30px rgba(22, 45, 30, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, label.camera-label { cursor: pointer; }
a { color: inherit; }

.app-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  max-width: 680px;
  margin: 0 auto;
}
.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(15,81,50,.2);
}
.app-header h1 { margin: 0; font-size: 19px; line-height: 1.1; }
.app-header p { margin: 3px 0 0; font-size: 11px; color: var(--muted); font-weight: 700; }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 6px 16px calc(92px + env(safe-area-inset-bottom));
}
.view { display: none; }
.view.active { display: block; }

.hero-card,
.panel,
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 26px;
  background:
    radial-gradient(circle at 95% 4%, rgba(80,166,113,.18), transparent 34%),
    var(--surface);
  margin-bottom: 14px;
}
.eyebrow {
  display: block;
  color: var(--green);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  margin-bottom: 6px;
}
.hero-card h2,
.section-title h2,
.prose h2 {
  margin: 0;
  font-size: 31px;
  line-height: 1.07;
  letter-spacing: -.035em;
}
.hero-card p { color: var(--muted); line-height: 1.45; margin: 10px 0 19px; }

.primary,
.secondary {
  border-radius: 15px;
  min-height: 48px;
  padding: 11px 16px;
  font-weight: 850;
  border: 1px solid transparent;
}
.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-2); }
.secondary { background: #f2f7f3; color: var(--green); border-color: #cadbd0; }
.secondary:disabled { opacity: .55; cursor: default; }
.big { width: 100%; min-height: 58px; font-size: 17px; }
.full { width: 100%; }
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 7px 3px;
  font-weight: 850;
  font-size: 12px;
}
.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--grey-soft);
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.panel { padding: 18px; margin-bottom: 14px; }
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-heading h3 { margin: 0; font-size: 20px; }
.panel label,
.report-panel label {
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 7px;
}
.input-row { display: flex; gap: 9px; }
.input-row input { flex: 1; min-width: 0; }
input,
textarea,
select {
  width: 100%;
  border: 1px solid #cdd7d0;
  background: #fff;
  color: var(--text);
  border-radius: 13px;
  padding: 12px 13px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #70a685;
  box-shadow: 0 0 0 3px rgba(15,81,50,.09);
}
textarea { resize: vertical; min-height: 112px; line-height: 1.45; }
.helper { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 8px 0 0; }

#reader {
  width: 100%;
  overflow: hidden;
  border-radius: 17px;
  background: #121212;
}
#reader video { border-radius: 17px; }
#reader button { border-radius: 10px; border: 0; padding: 8px 12px; }

.result-card { overflow: hidden; margin-bottom: 14px; }
.result-top { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.product-image {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 15px;
  background: #fafafa;
  border: 1px solid #edf0ed;
}
.product-placeholder { display: grid; place-items: center; color: #929b95; font-size: 27px; }
.product-copy { min-width: 0; }
.product-copy h3 { margin: 0; font-size: 19px; line-height: 1.2; }
.product-meta { color: var(--muted); margin: 5px 0 0; font-size: 12px; line-height: 1.4; }

.verdict { padding: 20px; }
.verdict.vegan { background: var(--green-soft); color: #123d28; }
.verdict.non-vegan { background: var(--red-soft); color: #6f1e1e; }
.verdict.uncertain { background: var(--amber-soft); color: #654300; }
.verdict.unknown { background: var(--grey-soft); color: #3e4741; }
.verdict-row { display: flex; align-items: flex-start; gap: 12px; }
.status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.66);
  display: grid;
  place-items: center;
  font-size: 23px;
  flex: 0 0 auto;
  font-weight: 900;
}
.verdict h2 { margin: 0; font-size: 26px; }
.confidence { font-size: 11px; font-weight: 900; opacity: .72; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.reason-list { margin: 14px 0 0; padding-left: 20px; line-height: 1.45; }
.reason-list li + li { margin-top: 7px; }
.result-action { margin-top: 16px; background: rgba(255,255,255,.7); }

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.evidence-item { background: #fbfcfb; padding: 11px 12px; min-width: 0; }
.evidence-item span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.evidence-item strong { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }

.result-details { padding: 18px 20px 20px; }
.result-details details summary { font-weight: 850; cursor: pointer; }
.ingredients-text { white-space: pre-wrap; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 10px; }
.result-links { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; flex-wrap: wrap; }
.source-link { color: var(--green); font-size: 12px; font-weight: 850; }

.report-panel {
  margin-top: 15px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}
.report-panel select,
.report-panel textarea { margin-bottom: 12px; }

.center { text-align: center; display: grid; place-items: center; gap: 9px; }
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #dbe4dd;
  border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.fallback-panel summary { cursor: pointer; font-weight: 900; line-height: 1.35; }
.fallback-panel > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.fallback-panel[open] summary { margin-bottom: 12px; }
.photo-actions { margin: 14px 0; }
.camera-label { display: grid !important; place-items: center; margin: 0 !important; }
.button-stack { display: grid; gap: 4px; margin-top: 10px; }

.ocr-panel {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 13px;
  align-items: start;
  padding: 12px;
  background: #f7faf7;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 14px;
}
.ingredient-preview {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dfe6e1;
  background: #fff;
}
.ocr-copy strong { display: block; font-size: 13px; line-height: 1.3; }
.progress-track {
  height: 7px;
  border-radius: 999px;
  background: #dce5df;
  overflow: hidden;
  margin-top: 9px;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width .2s ease;
}

.mini-result { margin-top: 12px; padding: 15px; border-radius: 14px; font-size: 14px; }
.mini-result.vegan { background: var(--green-soft); color: #123d28; }
.mini-result.non-vegan { background: var(--red-soft); color: #6f1e1e; }
.mini-result.uncertain { background: var(--amber-soft); color: #654300; }
.mini-result.unknown { background: var(--grey-soft); color: #3e4741; }
.mini-result-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mini-result-title span { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 900; opacity: .7; }
.mini-result-title strong { font-size: 18px; }
.mini-result p { margin: 9px 0 0; line-height: 1.45; }
.mini-evidence { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.mini-evidence span { background: rgba(255,255,255,.62); padding: 6px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }

.section-title { margin: 4px 2px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.history-list { display: grid; gap: 10px; }
.history-item {
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-status { width: 13px; height: 44px; border-radius: 999px; flex: 0 0 auto; }
.history-status.vegan { background: #22885a; }
.history-status.non-vegan { background: #c74646; }
.history-status.uncertain { background: #c68b18; }
.history-status.unknown { background: #89918c; }
.history-copy { flex: 1; min-width: 0; }
.history-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

.prose p { color: var(--muted); line-height: 1.55; }
.prose h3 { margin: 24px 0 7px; }
.legend { display: grid; gap: 11px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.vegan { background: #22885a; }
.dot.non-vegan { background: #c74646; }
.dot.uncertain { background: #c68b18; }
.dot.unknown { background: #89918c; }
.source-note { font-size: 12px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.nav-button {
  border: 0;
  background: transparent;
  min-height: 54px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  display: grid;
  place-items: center;
  gap: 2px;
}
.nav-button span { font-size: 21px; line-height: 1; }
.nav-button.active { color: var(--green); background: #f0f7f2; }

@media (max-width: 520px) {
  .evidence-strip { grid-template-columns: 1fr; }
  .evidence-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .evidence-item strong { text-align: right; }
}

@media (max-width: 430px) {
  main { padding-left: 12px; padding-right: 12px; }
  .hero-card { padding: 21px; }
  .hero-card h2, .section-title h2, .prose h2 { font-size: 27px; }
  .result-top { padding: 15px; }
  .verdict, .result-details { padding: 17px; }
  .ocr-panel { grid-template-columns: 82px 1fr; }
  .ingredient-preview { width: 82px; height: 82px; }
}

/* v0.3 */
.update-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 680px;
  margin: 0 auto 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #173c2a;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.update-banner span { font-size: 12px; font-weight: 800; }
.update-banner button {
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--green);
  padding: 8px 10px;
  font-weight: 900;
  white-space: nowrap;
}
.product-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.favourite-button {
  border: 1px solid #cadbd0;
  background: #fff;
  color: var(--green);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.favourite-button.saved { background: var(--green); color: #fff; border-color: var(--green); }
.why-block {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(0,0,0,.09);
}
.why-block > strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .78;
}
.why-block .reason-list { margin-top: 8px; }
.ingredient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.ingredient-chip {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 850;
}
.history-heading { margin-top: 28px; }
.saved-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 42px;
  align-items: stretch;
  gap: 8px;
}
.saved-row + .saved-row { margin-top: 8px; }
.saved-row .history-item { width: 100%; }
.remove-favourite {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
}

@media (max-width: 420px) {
  .result-top { align-items: flex-start; }
  .product-image { width: 68px; height: 68px; }
  .product-heading-row { align-items: flex-start; }
  .favourite-button { padding-inline: 7px; }
}

/* v0.4 */
.verdict-kicker {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .68;
}
.verdict-main-copy { min-width: 0; }
.trust-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-item {
  min-width: 0;
  padding: 13px 14px;
  background: #fff;
}
.trust-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.trust-item strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
}
.primary-trust strong { color: var(--green); }
.reviewed-source {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.submission-panel {
  border-color: #bfd3c5;
  box-shadow: 0 14px 34px rgba(15,81,50,.11);
}
.submission-intro { margin: -3px 0 16px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.form-field { min-width: 0; }
.form-field.span-2 { grid-column: 1 / -1; }
.form-field label { margin-bottom: 6px; }
.form-field textarea { min-height: 92px; }
.submission-success {
  color: #165c37;
  font-weight: 800;
  background: var(--green-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.submission-error {
  color: #7a2525;
  font-weight: 800;
  background: var(--red-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.admin-link { color: var(--green); font-weight: 850; }
code {
  background: #eef2ef;
  border-radius: 6px;
  padding: 2px 5px;
  font-size: .92em;
}

@media (max-width: 520px) {
  .trust-card { grid-template-columns: 1fr; }
  .trust-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .trust-item strong { text-align: right; }
}

@media (max-width: 430px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-field.span-2 { grid-column: auto; }
}

/* v0.4 admin */
.admin-header { position: relative; }
.admin-heading-copy { flex: 1; min-width: 0; }
.admin-back {
  color: var(--green);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
}
.admin-main { padding-bottom: 44px; }
.admin-main h2 { margin: 0 0 10px; font-size: 28px; }
.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 2px 14px;
}
.admin-toolbar h2 { margin: 0; }
.admin-reports-title { margin-top: 34px; }
.review-list { display: grid; gap: 12px; }
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 17px;
  box-shadow: var(--shadow);
}
.review-card.pending { border-left: 4px solid #c68b18; }
.review-card.reviewed { border-left: 4px solid #6b8274; opacity: .86; }
.review-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.review-card-head h3 { margin: 4px 0 3px; font-size: 19px; }
.review-card-head p { margin: 0; color: var(--muted); font-size: 12px; }
.review-card-head time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.review-status {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2ef;
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.review-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 13px 0;
}
.review-meta span {
  padding: 6px 8px;
  border-radius: 10px;
  background: #f4f6f4;
  color: var(--muted);
  font-size: 11px;
}
.review-note {
  margin-top: 12px;
  padding: 11px 12px;
  background: #faf7ed;
  border-radius: 12px;
}
.review-note strong { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.review-note p { margin: 5px 0 0; font-size: 13px; line-height: 1.45; }
.review-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.review-actions { display: flex; gap: 9px; margin-top: 12px; }
.reviewed-line { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

@media (max-width: 600px) {
  .review-card-head { display: block; }
  .review-card-head time { display: block; margin-top: 6px; }
  .review-form { grid-template-columns: 1fr; }
  .review-form .span-2 { grid-column: auto; }
  .review-actions { display: grid; grid-template-columns: 1fr; }
}

/* v0.5 visual polish */
:root {
  --bg: #f3f7f4;
  --surface: #ffffff;
  --text: #17231c;
  --muted: #657269;
  --border: #dbe5de;
  --green: #0b4f35;
  --green-2: #146b48;
  --green-soft: #e3f4e9;
  --red: #a73333;
  --red-soft: #fdeaea;
  --amber: #8a5b00;
  --amber-soft: #fff3d3;
  --grey-soft: #edf2ee;
  --shadow: 0 14px 34px rgba(23, 56, 35, .08);
}

body {
  background:
    radial-gradient(circle at 50% -160px, rgba(34, 136, 90, .12), transparent 360px),
    var(--bg);
}

.app-header {
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-bottom: 14px;
}
.header-copy { min-width: 0; flex: 1; }
.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 16px 16px 16px 6px;
  background: linear-gradient(145deg, #0b4f35, #18754f);
  box-shadow: 0 8px 22px rgba(11,79,53,.22);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 8px;
  border-radius: 100% 0 100% 0;
  background: rgba(255,255,255,.26);
  right: 7px;
  top: 6px;
  transform: rotate(-24deg);
}
.brand-mark span { position: relative; z-index: 1; }
.app-header h1 { font-size: 20px; letter-spacing: -.02em; }
.app-header p { font-weight: 650; }
.version-badge {
  flex: 0 0 auto;
  border: 1px solid #c9dbcf;
  background: rgba(255,255,255,.76);
  color: var(--green);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}

.hero-polished {
  overflow: hidden;
  position: relative;
  padding: 27px;
  background:
    radial-gradient(circle at 105% -8%, rgba(53, 160, 102, .25), transparent 42%),
    linear-gradient(160deg, #ffffff 0%, #fbfdfb 66%, #eff8f2 100%);
}
.hero-polished::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -62px;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(11,79,53,.035);
  border-radius: 50%;
  pointer-events: none;
}
.hero-polished h2 { max-width: 520px; font-size: clamp(31px, 7vw, 42px); }
.hero-polished > p { max-width: 530px; font-size: 15px; }
.hero-actions { display: grid; grid-template-columns: 1.2fr .95fr; gap: 10px; position: relative; z-index: 1; }
.hero-actions .big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.hero-actions .primary span { font-size: 21px; }
.support-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  position: relative;
  z-index: 1;
}
.support-strip span {
  border: 1px solid #d8e6dc;
  background: rgba(255,255,255,.72);
  color: #52635a;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
}
.compact-panel { padding-block: 15px; }
.manual-panel { box-shadow: none; background: rgba(255,255,255,.74); }
.center { display: grid; place-items: center; gap: 8px; text-align: center; }
.center .helper { margin: 0; }

.result-card { border-color: #d4e1d8; box-shadow: 0 18px 45px rgba(20, 52, 32, .11); }
.result-top { background: linear-gradient(180deg, #fff, #fbfdfb); }
.product-image { box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.product-copy h3 { letter-spacing: -.02em; }
.category-badge { background: #eaf4ed; }
.claim-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.claim-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 850;
  border: 1px solid transparent;
}
.claim-pill.positive { background: #e5f5e9; color: #155b39; border-color: #c7e4d0; }
.claim-pill.neutral { background: #edf2f6; color: #4b5b65; border-color: #dae2e8; }
.confidence-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.78);
}
.flagged-heading {
  margin-top: 13px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .72;
}
.ingredient-chip {
  gap: 5px;
  align-items: center;
  border: 1px solid rgba(0,0,0,.08);
}
.ingredient-chip.danger { background: rgba(255,255,255,.78); color: #7b2424; border-color: rgba(122,36,36,.18); }
.ingredient-chip.warning { background: rgba(255,255,255,.78); color: #74500a; border-color: rgba(116,80,10,.18); }
.scope-note {
  margin-bottom: 15px;
  border: 1px solid #dce6df;
  background: #f6f9f7;
  border-radius: 14px;
  padding: 12px 13px;
}
.scope-note strong { display: block; color: var(--green); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.scope-note p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.unknown-flow { padding-bottom: 19px; }
.next-steps {
  margin: 17px 0 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.09);
}
.next-steps > strong { display: block; margin-bottom: 9px; font-size: 12px; }
.step-row { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; margin-top: 8px; }
.step-row > span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 900;
}
.step-row p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }

.about-card { overflow: hidden; }
.about-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 18px 0 4px;
}
.about-highlight-grid > div {
  border: 1px solid var(--border);
  background: #f8faf8;
  border-radius: 14px;
  padding: 12px;
}
.about-highlight-grid strong { display: block; color: var(--green); font-size: 13px; }
.about-highlight-grid span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.install-card {
  margin: 22px -2px 0;
  border: 1px solid #cfe0d4;
  background: linear-gradient(145deg, #f5fbf7, #edf7f0);
  border-radius: 17px;
  padding: 16px;
}
.install-card h3 { margin-top: 0; }
.install-card p { margin-top: 7px; }

/* v0.5 admin dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(22,45,30,.06);
}
.stat-card span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; margin-top: 5px; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.stats-note { margin: -8px 2px 19px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-section-separator { margin-top: 28px; }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-highlight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero-actions { grid-template-columns: 1fr; }
  .hero-polished { padding: 23px; }
  .support-strip { gap: 5px; }
  .support-strip span { font-size: 9px; }
}

@media (max-width: 380px) {
  .version-badge { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* v0.7 beta onboarding, trust and support */
body.onboarding-open { overflow: hidden; }
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(6, 35, 25, .74);
  backdrop-filter: blur(10px);
}
.onboarding-overlay.hidden { display: none; }
.onboarding-card {
  width: min(100%, 560px);
  max-height: 94vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.onboarding-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 30px;
  font-weight: 900;
  background: #dff4e9;
  color: #0b4f35;
}
.onboarding-card h2 { margin: 6px 0 10px; font-size: clamp(1.7rem, 7vw, 2.3rem); }
.onboarding-card > p { color: var(--muted, #53645d); line-height: 1.55; }
.onboarding-steps { display: grid; gap: 10px; margin: 20px 0; }
.onboarding-steps > div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; background: #f4f8f5; }
.onboarding-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #0b4f35; color: #fff; font-weight: 800; }
.onboarding-steps p { margin: 0; line-height: 1.4; }
.onboarding-note { margin: 16px 0; padding: 12px 14px; border-left: 4px solid #d89b18; background: #fff8e6; border-radius: 10px; font-size: .92rem; line-height: 1.45; }
.onboarding-privacy { display: block; text-align: center; margin-top: 12px; color: #0b4f35; font-weight: 700; }
.device-cache-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #eef7f2; color: #315a49; font-size: .86rem; border: 1px solid #d3e9dd; }
.feedback-card { margin-top: 26px; padding: 18px; border-radius: 18px; background: #f4f8f5; border: 1px solid #dce9e1; }
.feedback-card h3 { margin: 5px 0 8px; }
.feedback-card label { display: block; margin-top: 12px; margin-bottom: 6px; font-weight: 700; }
.feedback-card select, .feedback-card textarea { width: 100%; }
.feedback-card button { margin-top: 12px; }
.support-links { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 20px 0 6px; }
.support-links a { font-weight: 700; color: #0b4f35; }

/* Standalone support pages */
.info-page { min-height: 100vh; background: #f3f7f4; }
.info-main { width: min(100% - 28px, 780px); margin: 24px auto 64px; }
.info-card { background: #fff; border-radius: 22px; padding: clamp(20px, 5vw, 34px); box-shadow: 0 12px 36px rgba(20,61,43,.08); }
.info-card h1, .info-card h2, .info-card h3 { color: #173c2d; }
.info-card h1 { margin: 4px 0 14px; }
.info-card h2 { margin-top: 28px; }
.info-card p, .info-card li { line-height: 1.62; color: #40544a; }
.info-card ul { padding-left: 22px; }
.info-back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 14px; color: #0b4f35; font-weight: 800; text-decoration: none; }
.info-callout { padding: 14px 16px; border-radius: 14px; background: #eef7f2; border: 1px solid #d3e9dd; }
.info-warning { padding: 14px 16px; border-radius: 14px; background: #fff8e6; border: 1px solid #efd89d; }
.info-footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid #e4ece7; }
.info-footer-links a { color: #0b4f35; font-weight: 700; }

@media (max-width: 520px) {
  .onboarding-card { padding: 21px; border-radius: 24px; }
  .trust-card { grid-template-columns: 1fr 1fr; }
}
