/* Less Busywork — tokens
   type: Bricolage Grotesque 650 for questions and titles, Public Sans 400/500/600 for everything else
   scale: 13 / 15 / 17 / 22 / 28 / 34
   space: 4 8 12 16 24 32 48 72 */
:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #586070;
  --line: #d8dce2;
  --accent: #0d6a5b;
  --accent-ink: #ffffff;
  --accent-soft: #e0efeb;
  --warn: #8a5300;
  --focus: #2f6fe0;
  --radius: 12px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101215;
    --surface: #191c20;
    --ink: #eceef1;
    --muted: #a3a9b4;
    --line: #2d3238;
    --accent: #52c3a9;
    --accent-ink: #08130f;
    --accent-soft: #15302a;
    --warn: #f0b45c;
    --focus: #7aa7ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101215; --surface: #191c20; --ink: #eceef1; --muted: #a3a9b4; --line: #2d3238;
  --accent: #52c3a9; --accent-ink: #08130f; --accent-soft: #15302a; --warn: #f0b45c; --focus: #7aa7ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.app {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 140px;
}
.loading { color: var(--muted); }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top) + 12px) 20px 0;
}
.bar-row {
  max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.bar-section { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save { white-space: nowrap; }
.save.pending { color: var(--warn); }
.progress { max-width: 560px; margin: 10px auto 0; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 240ms cubic-bezier(.2,.7,.2,1); }

/* type */
h1 {
  font: 650 34px/1.12 var(--display);
  letter-spacing: -0.015em;
  margin: 24px 0 16px;
}
.q-label {
  font: 650 26px/1.2 var(--display);
  letter-spacing: -0.01em;
  margin: 8px 0 12px;
}
.help { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.lede { font-size: 19px; line-height: 1.5; margin: 0 0 24px; max-width: 34em; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.kicker { color: var(--muted); font-size: 15px; margin: 0; }
.optional-tag { font: 500 13px/1 var(--body); color: var(--muted); margin-left: 8px; vertical-align: 4px; }

/* inputs */
textarea, input[type="text"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.5;
}
textarea { min-height: 168px; resize: vertical; }
textarea:focus, input[type="text"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.other-input { margin-top: 12px; }

.options { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 52px;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms;
}
.opt .mark {
  flex: none; width: 22px; height: 22px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  display: grid; place-items: center;
}
.options.multi .opt .mark { border-radius: 6px; }
.opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt[aria-checked="true"] .mark { background: var(--accent); border-color: var(--accent); }
.opt[aria-checked="true"] .mark::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink);
  transform: translateY(-1px) rotate(-45deg);
}
.opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.count { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.note { margin-top: 16px; }
.note-toggle { padding-left: 0; color: var(--accent); font-weight: 600; }
.note-input { min-height: 96px; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale .opt { justify-content: center; padding: 14px 0; font-weight: 600; }
.scale .opt .mark { display: none; }
.scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; margin-top: 8px; }

/* confirm (best-guess) */
.guess {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
}
.guess-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.guess p:last-child { margin: 0; }
.choice-row { display: flex; gap: 8px; margin-bottom: 16px; }
.choice-row .opt { justify-content: center; }
.choice-row .opt .mark { display: none; }

/* files */
.files-note { font-size: 15px; color: var(--muted); margin: 0 0 24px; }
.files-note strong { color: var(--ink); font-weight: 600; }
.drop {
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
}
.drop span { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px 10px 16px; font-size: 15px;
}
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .state { color: var(--muted); white-space: nowrap; }
.err { color: var(--warn); font-size: 15px; margin: 12px 0 0; }

/* buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 17px;
  border-radius: var(--radius);
  padding: 14px 28px; min-height: 52px;
}
.btn:disabled { opacity: .4; cursor: default; }
.btn-text {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 500; font-size: 17px;
  padding: 14px 8px; min-height: 52px;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(env(safe-area-inset-bottom) + 12px);
  display: flex; align-items: center; gap: 8px;
}
.nav > * { flex: none; }
.nav #next { margin-left: auto; }
@media (min-width: 640px) {
  .nav { padding-left: calc(50vw - 280px); padding-right: calc(50vw - 280px); }
}

.screen { animation: in 220ms cubic-bezier(.2,.7,.2,1); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .progress-fill { transition: none; } }

.privacy { color: var(--muted); font-size: 15px; margin: 48px 0 0; max-width: 32em; }
