/*
 * One column, large tap targets, no framework.
 *
 * This is answered on a phone, outdoors, often on a slow connection, days
 * after a camp. Everything here follows from that: system fonts so nothing is
 * downloaded, targets that clear 44px, and a layout that does not reflow when
 * the on-screen keyboard opens.
 */

:root {
  --ink: #1a1a1c;
  --muted: #6b6b72;
  --line: #e3e3e8;
  --accent: #1a5fb4;
  --accent-soft: #eaf1fb;
  --bg: #f6f6f8;
  --card: #ffffff;
  --warn: #a33;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  min-height: 100vh;
}

.masthead { margin: 8px 0 20px; }

.org {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.event {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
}

/* ------------------------------------------------------------- progress */

.progress {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 220ms ease;
}

/* --------------------------------------------------------------- cards */

.screen { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
}

.question {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.hint {
  margin: -8px 0 16px;
  font-size: 14px;
  color: var(--muted);
}

/* -------------------------------------------------------------- inputs */

.options { display: grid; gap: 10px; }

.option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  min-height: 48px;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.option:hover { border-color: #c9c9d2; }

.option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* A 1-5 or 0-10 row that wraps instead of scrolling sideways. */
.scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scale .option {
  flex: 1 1 auto;
  min-width: 48px;
  text-align: center;
  padding: 12px 6px;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------- actions */

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.button {
  flex: 1;
  padding: 15px 20px;
  min-height: 50px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.button[disabled] {
  background: #b9c6da;
  cursor: not-allowed;
}

.button-quiet {
  flex: 0 0 auto;
  background: none;
  color: var(--muted);
  font-weight: 500;
  border: 1.5px solid var(--line);
}

.error {
  margin: 12px 0 0;
  color: var(--warn);
  font-size: 14px;
}

.loading { color: var(--muted); }

/* ---------------------------------------------------------------- done */

.done-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.done h2 { margin: 0 0 10px; font-size: 20px; }
.done p { margin: 0 0 16px; color: var(--muted); }

.download {
  display: inline-block;
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.footnote {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.footnote a { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ececf0;
    --muted: #9a9aa4;
    --line: #34343c;
    --accent: #6ea8fe;
    --accent-soft: #1c2839;
    --bg: #131316;
    --card: #1c1c21;
  }
  .button { color: #10131a; }
  .download { color: #10131a; }
}

/* -------------------------------------------------------------- updates */

/*
 * A strip, not a modal. Somebody half-way through the questions can finish
 * the one in front of them before refreshing; their answers survive either
 * way, but interrupting them mid-tap is how a response gets abandoned.
 */
.update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.update-button {
  flex: 0 0 auto;
  padding: 8px 14px;
  min-height: 40px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.build {
  display: block;
  margin-top: 8px;
  opacity: 0.7;
}

@media (prefers-color-scheme: dark) {
  .update-button { color: #10131a; }
}
