:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16191d;
  --muted: #5b6470;
  --line: #dde1e6;
  --line-strong: #c4cad2;
  --accent: #1f5fbf;
  --accent-soft: #eaf1fb;
  --accent-ink: #ffffff;
  --met: #1b7a3d;
  --met-soft: #e8f4ec;
  --not-met: #b42318;
  --ask: #a15c00;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button { cursor: pointer; }

.bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }
.privacy { font-size: 12.5px; text-align: right; color: var(--met); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.privacy::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

main { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.step-label { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: none; margin-bottom: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.card.good { border-left: 3px solid var(--met); }
.card.plain { background: transparent; border: 0; padding: 0; }

.btn {
  display: block; width: 100%; min-height: 48px; padding: 12px 16px; margin-top: 12px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 600; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.link { display: inline-block; width: auto; text-align: left; border: 0; background: none; color: var(--accent); min-height: 40px; padding: 8px 0; margin-top: 4px; font-weight: 500; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.points { list-style: none; padding: 0; margin: 12px 0; }
.points li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.points li:last-child { border-bottom: 0; }
.points .n { flex: 0 0 22px; height: 22px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; display: grid; place-items: center; }

.samples { display: grid; gap: 8px; margin-top: 8px; }
.sample { text-align: left; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.sample strong { display: block; }
.sample span { font-size: 14px; color: var(--muted); }

/* progress steps */
.steps { list-style: none; padding: 0; margin: 16px 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .dot { width: 14px; height: 14px; margin-top: 4px; border-radius: 3px; border: 2px solid var(--line-strong); }
.steps li.done .dot { background: var(--met); border-color: var(--met); }
.steps li.active .dot { border-color: var(--accent); background: var(--accent-soft); }
.steps .sub { display: block; font-size: 14px; color: var(--muted); }
.meter { height: 6px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* questionnaire */
.q-progress { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.q-text { font-size: 21px; line-height: 1.35; font-weight: 600; margin: 20px 0 8px; }
.q-why { font-size: 14px; color: var(--muted); }
.choices { display: grid; gap: 10px; margin-top: 20px; }
.choice {
  min-height: 52px; padding: 12px 16px; text-align: left; font-weight: 600;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* results */
.verdict-line { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.verdict-line::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.good-ink { color: var(--met); }
.bad-ink { color: var(--not-met); }
.trial-title { font-size: 17px; font-weight: 700; margin: 6px 0 2px; line-height: 1.35; }
.trial-meta { font-size: 14px; color: var(--muted); }
.count-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.count-row div { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.count-row b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.count-row span { font-size: 12.5px; color: var(--muted); line-height: 1.3; display: block; }
.reason { font-size: 14px; margin: 6px 0 0; }
.reason .muted { display: block; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 6px 0; }
.list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.list li { margin: 4px 0; }

/* share */
.share-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; }
.share-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.share-list li:last-child { border-bottom: 0; }
.share-list .src { display: block; color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 6px; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.field input { padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text); background: var(--surface); font-size: 16px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 15px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.note-box { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.error { color: var(--not-met); font-size: 14px; }
