:root {
  --bg: #f6f2ea;
  --card: #fffdf9;
  --ink: #2f2a24;
  --muted: #6f665a;
  --line: #e3dacb;
  --accent: #5c6b48;      /* olive */
  --accent-2: #a0673f;    /* terracotta */
  --accent-soft: #e9ecdf;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 'Source Sans 3', system-ui, sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap.wide { max-width: 880px; }
h1 { font-size: 30px; line-height: 1.2; margin: 4px 0 12px; }
h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
h3 { font-size: 17px; margin: 0 0 2px; }
.kicker { color: var(--accent-2); font-weight: 600; font-size: 14px; margin: 0; }
.meta { color: var(--muted); font-size: 14px; }
.intro { margin-bottom: 24px; }
.intro.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.q { border: 0; padding: 0; margin: 18px 0 0; }
.q + .q { border-top: 1px solid var(--line); padding-top: 18px; }
h2 + .q { margin-top: 8px; }
legend { font-weight: 600; font-size: 17px; padding: 0; margin-bottom: 10px; }
.num { color: var(--accent); }
.hint { color: var(--muted); font-size: 14px; margin: -6px 0 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--accent); }
.opt input { accent-color: var(--accent); margin: 0; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.scale .opt { min-width: 56px; justify-content: center; }
.ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 340px; }
textarea, input[type=text], input[type=password] { width: 100%; font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
textarea:focus, input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.other { margin-top: 10px; }
.submit { margin-top: 8px; }
.btn { display: inline-block; font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: 10px 22px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #4d5a3c; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.status { color: var(--accent-2); font-size: 14px; min-height: 1.2em; }
.note { color: var(--muted); font-size: 14px; }
.done h2 { font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.login { max-width: 380px; margin: 60px auto; }
.login label { display: block; font-weight: 600; margin-bottom: 6px; }
.login .btn { margin-top: 12px; }
.bars { display: grid; gap: 6px; margin-top: 6px; }
.bar { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 80px; gap: 12px; align-items: center; font-size: 15px; }
.track { background: #efe8dc; border-radius: 4px; height: 12px; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bv { color: var(--muted); font-size: 14px; text-align: right; }
.quotes { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.quotes li { background: #faf6ef; border-left: 3px solid var(--accent-2); padding: 8px 12px; border-radius: 4px; white-space: pre-wrap; }
.muted { color: var(--muted); }
.empty { color: var(--muted); }
@media (max-width: 560px) {
  .bar { grid-template-columns: 1fr 60px; }
  .bar .track { grid-column: 1 / -1; grid-row: 2; }
}
select { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; min-width: 220px; }
.follow { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--accent-soft); }
.follow-label { display: block; font-weight: 600; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.missing legend, .missing .follow-label { color: var(--accent-2); }
.missing textarea, .missing select { border-color: var(--accent-2); }
.btn.small { padding: 5px 12px; font-size: 14px; }
.tracker { display: grid; gap: 8px; margin: 6px 0 10px; }
.person { display: grid; grid-template-columns: 12px 90px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.person .dot { width: 10px; height: 10px; border-radius: 50%; background: #d8cdbb; }
.person.yes .dot { background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 6px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff; }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 20px; font-weight: 700; margin-top: 2px; }
.tile-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
table.answers { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
.answers th, .answers td { text-align: left; vertical-align: top; padding: 10px 10px; border-top: 1px solid var(--line); }
.answers thead th { border-top: 0; font-size: 14px; color: var(--accent); }
.answers .qcol { width: 30%; font-weight: 600; }
.answers .follow-row th, .answers .follow-row td { border-top: 0; padding-top: 0; }
.answers .follow-row th { color: var(--muted); font-weight: 600; font-size: 14px; padding-left: 22px; }
.answers td.pick { font-weight: 600; }
.answers td.txt { white-space: pre-wrap; }
@media (max-width: 640px) {
  .answers .qcol { width: auto; }
  .person { grid-template-columns: 12px 1fr auto; }
  .person .meta { grid-column: 2; grid-row: 2; }
}
.q > legend { float: left; width: 100%; }
.q > legend + * { clear: both; }
.q > .hint { margin-top: 0; }
table.answers { table-layout: fixed; }
