:root {
  --bg: #fbf7ef;
  --fg: #1f2734;
  --card: #fffdfa;
  --primary: #e95d3a;
  --primary-fg: #fffcf5;
  --muted: #626c7c;
  --border: #dfd9cc;
  --track: #e5dfd2;
  --chart-1: #e95d3a;
  --chart-2: #008c93;
  --chart-3: #70b85f;
  --radius: 0.75rem;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 2.25rem 1.5rem 3rem; }
.home h1 { max-width: 16ch; }
h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -0.03em; margin: 0.3rem 0 1rem; font-weight: 800; }
h2 { font-size: 1.45rem; margin: 0 0 0.4rem; font-weight: 750; }
p { margin: 0.4rem 0; }
.eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 750;
  font-size: 0.78rem;
}
.brand-sub { margin: 0.15rem 0 0.8rem; color: var(--muted); font-weight: 650; }
.lede { color: var(--muted); max-width: 40rem; }
.home-grid { display: grid; gap: 1.1rem; margin-top: 1.2rem; }
@media (min-width: 860px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem 1.4rem 1.35rem;
}
.card.dark { background: var(--fg); color: #fbf7ef; border-color: transparent; }
.card.dark p { color: #e7e1d6; }
.card.dark .text-link { color: #ffd2c4; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.9rem;
  background: var(--primary);
  color: var(--primary-fg);
  border: 0;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost {
  width: auto;
  margin-top: 0;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn:focus-visible, .choice:focus-within, a:focus-visible, input:focus-visible {
  outline: 3px solid #e95d3a;
  outline-offset: 2px;
}
.text-link { color: var(--primary); font-weight: 700; }
.link-row { margin: 0.85rem 0 0; }
.card .link-row { margin-bottom: 0; }
.scenario-grid { display: grid; gap: 0.9rem; margin: 1rem 0 0.4rem; }
@media (min-width: 900px) {
  .scenario-grid { grid-template-columns: repeat(3, 1fr); }
}
.scenario-card h2 { font-size: 1.2rem; }
.kicker { color: var(--muted); font-weight: 700; margin: 0.7rem 0 0.2rem; }
.image-ph, .shot {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 10rem;
  max-height: 58vh;
  height: 32vh;
  background: #efeae0;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 1rem;
  object-fit: contain;
}
.image-ph-sm, .shot-sm { height: 8.5rem; min-height: 8.5rem; max-height: 8.5rem; font-size: 0.92rem; }
.stack { margin-top: 0.4rem; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
}
.join-link { color: var(--fg); font-weight: 750; text-decoration: none; }
.people { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.people-icon { display: inline-flex; color: var(--muted); }
body.present { display: flex; flex-direction: column; }
.present-main { flex: 1; padding: 0.25rem 1.25rem 0.75rem; }
.intro, .poll-slide { max-width: 68rem; margin: 0 auto; }
.intro h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.intro .btn { max-width: 22rem; }
.desc { white-space: pre-line; color: var(--fg); max-width: 46rem; font-size: 1.05rem; }
.poll-slide h1 { font-size: clamp(1.45rem, 2.4vw, 2.15rem); margin-bottom: 0.2rem; }
.chart { margin: 0.1rem 0 0.15rem; }
.chart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.chart h2 { font-size: 1.05rem; margin: 0; font-weight: 750; }
.swatch { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 99px; background: var(--series); margin-right: 0.3rem; }
.mean { margin: 0; font-size: 1.45rem; font-weight: 800; color: var(--series); font-variant-numeric: tabular-nums; }
.chart-mid, .chart-bins { display: flex; gap: 0.7rem; align-items: center; }
.end, .end.spacer { width: 7.1rem; flex: none; font-size: 0.78rem; line-height: 1.2; color: var(--muted); margin: 0; }
.end.left { text-align: right; }
.plot { position: relative; flex: 1; height: 6rem; }
.plot svg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 50%; display: block; }
.track { position: absolute; left: 0; right: 0; top: 50%; height: 0; }
.bar { position: absolute; left: 0; right: 0; top: -2px; height: 4px; background: var(--track); border-radius: 99px; }
.tick { position: absolute; top: -7px; width: 2px; height: 14px; background: #cfc6b6; transform: translateX(-50%); }
.dot {
  position: absolute;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--series);
  transform: translate(-50%, -50%);
  transition: left 700ms;
  z-index: 1;
}
.bins { position: relative; flex: 1; height: 1.35rem; }
.bins span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.n { margin: 0.05rem 0 0.2rem; text-align: center; color: var(--muted); font-size: 0.82rem; }
.footer-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.65rem 0.8rem;
  background: rgba(251, 247, 239, 0.96);
  border-top: 1px solid var(--border);
}
.footer-bar form { display: flex; }
.footer-bar .btn { width: auto; margin-top: 0; }
.view-only p { margin: 0; text-align: center; color: var(--muted); font-weight: 650; }
.narrow { max-width: 28rem; margin: 0 auto; padding: 1.5rem 1.1rem 2.5rem; }
.narrow-admin { max-width: 40rem; }
.statement { border: 0; margin: 0.85rem 0 0; padding: 0; }
.statement legend { font-weight: 750; padding: 0; margin-bottom: 0.45rem; }
.choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.45rem; }
.choice {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  font-weight: 800;
  cursor: pointer;
}
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
  transform: scale(1.06);
}
.endpoints { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; }
.error { color: #9f2d2d; font-weight: 750; }
.saved { color: #1d7a45; font-weight: 750; }
.field { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; margin-top: 0.7rem; }
.field input, .field textarea {
  font: inherit;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
}
.field textarea { resize: vertical; min-height: 6.5rem; line-height: 1.4; }
.placeholder { color: var(--muted); margin: 0.35rem 0 0.2rem; }

.status { font-size: 1.35rem; font-weight: 750; line-height: 1.3; }

.scenario-edit {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.9rem 1rem 1rem;
  margin: 0 0 1rem;
}
.scenario-edit legend { font-weight: 750; padding: 0 0.3rem; }
.scenario-edit .shot, .scenario-edit .image-ph { margin-bottom: 0.8rem; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0; }
input[type="file"] { width: 100%; }
