:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2530;
  --muted: #6b7683;
  --line: #e4e8ee;
  --brand: #2f6f6a;
  --brand-ink: #ffffff;
  --danger: #b23b3b;
  --danger-bg: #fdf1f1;
  --notice-bg: #f0f6f5;
  --chip-bg: #eef2f4;
  --radius: 14px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0 16px;
}

header.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 4px 6px;
}
header.site .site-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
header.site .brand { font-weight: 700; letter-spacing: -0.01em; }
header.site .tag { color: var(--muted); font-size: 14px; }

.lang-switch { display: flex; gap: 4px; flex: none; }
.lang-btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12.5px; padding: 4px 9px; border-radius: 999px; cursor: pointer;
}
.lang-btn:hover { border-color: #c7cfd8; }
.lang-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

main { max-width: var(--maxw); margin: 0 auto; padding: 12px 0 60px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(20, 30, 40, 0.04);
}
.card.inline { padding: 16px; margin: 14px 0; }

h1 { font-size: 27px; margin: 0 0 10px; letter-spacing: -0.02em; }
h2 { font-size: 21px; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 0; }

p { margin: 0 0 14px; }
.lead { color: #37424e; font-size: 17px; }
.help { color: var(--muted); font-size: 14.5px; margin-top: -4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

a { color: var(--brand); }

.notice {
  background: var(--notice-bg);
  border: 1px solid #d7e6e3;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
  font-size: 14.5px;
}
.notice strong { display: inline; }
.notice-card { border-color: #d7e6e3; }

/* Lightweight, non-alarming disclaimer — a quiet line, not a boxed banner. */
.disclaimer {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  border-left: 3px solid var(--line);
  padding: 1px 0 1px 12px;
  margin: 16px 0;
}
.disclaimer strong { color: #37424e; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 15.5px;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s, transform .02s;
}
.btn:hover { border-color: #c7cfd8; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.btn.primary:hover { background: #275c58; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding-left: 0; }
.btn.option { width: 100%; }

.options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 8px; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: baseline; }

.progress { height: 6px; background: var(--line); border-radius: 999px; margin-bottom: 18px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width .2s; }

.checklist { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  font-size: 15px;
}
.check:hover { border-color: #c7cfd8; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--danger); }
.check.toggle { margin: 16px 0 4px; font-size: 14.5px; }
.check.toggle input { accent-color: var(--brand); }

.card.danger { border-color: #ecc7c7; background: var(--danger-bg); }
.card.danger h2, .card.danger .lead { color: var(--danger); }

/* results */
.result-item { border-top: 1px solid var(--line); padding: 18px 0; }
.result-item.top { background: var(--notice-bg); border: 1px solid #d7e6e3; border-radius: 12px; padding: 16px; margin-bottom: 6px; }
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.badge { background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.one-line { color: #37424e; font-weight: 600; }
.disc, .soothe { font-size: 14.5px; }
.soothe { color: #37424e; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
  background: var(--chip-bg); color: #33454f; text-decoration: none;
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid #dde4e8;
}
.chip:hover { background: #e3eaed; }

/* references */
.refs { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 20px; }
.ref { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ref-title { font-weight: 600; text-decoration: none; }
.ref-cite { font-size: 13.5px; color: #48535f; margin: 6px 0 0; }
.grade { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--chip-bg); color: #46525c; }
.grade-high { background: #e5f2ea; color: #2c6b45; }
.grade-moderate { background: #eef4ea; color: #4b6b2c; }
.grade-expert { background: #eef1f6; color: #3f4d6b; }
.grade-low, .grade-physiologic { background: #f6f1e8; color: #7a5a2c; }

footer.site { max-width: var(--maxw); margin: 0 auto; padding: 8px 4px 40px; color: var(--muted); font-size: 13px; text-align: center; }
footer.site a { color: var(--muted); }
