:root {
  --bg: #f6f4ef;
  --card: #fff;
  --ink: #1f2a2a;
  --muted: #5d6b6a;
  --line: #e2ddd3;
  --accent: #2f6f62;
  --accent-ink: #fff;
  --soft: #e7f0ed;
  --err: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 36px 0 18px; position: sticky; top: -150px; z-index: 5; }
h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
h2 { margin: 0 0 16px; font-size: 20px; line-height: 1.3; }
.lead { margin: 0 0 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; margin: 6px 0 0; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
main { padding: 24px 20px 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-bottom: 18px; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 700; margin-right: 8px; vertical-align: 2px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .card { padding: 18px; } h1 { font-size: 24px; } }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.q { margin-bottom: 20px; }
.q:last-child { margin-bottom: 0; }
.q > span { font-weight: 600; }
input, textarea { font: inherit; font-weight: 400; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfbf8; width: 100%; }
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; background: #fff; }
input.bad { border-color: var(--err); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.chip { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; cursor: pointer; background: #fcfbf8; transition: background .15s, border-color .15s; }
.chip input { width: auto; margin: 0; accent-color: var(--accent); }
.chip:has(input:checked) { background: var(--soft); border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--line); }
.status { flex: 1 1 200px; margin: 0; color: var(--muted); font-size: 14px; }
.status.err { color: var(--err); }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 11px 20px; border-radius: 10px; cursor: pointer; transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); }
.done a { word-break: break-all; color: var(--accent); }
/* admin */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.row { cursor: pointer; }
tr.row:hover { background: var(--soft); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line); }
.pill.submitted { background: var(--soft); color: var(--accent); }
.answer { white-space: pre-wrap; margin: 4px 0 16px; padding: 10px 12px; background: #fcfbf8; border: 1px solid var(--line); border-radius: 10px; }
.answer.empty { color: var(--muted); font-style: italic; }
.qtext { font-weight: 600; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
