:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1b1c1a;
  --soft: #62665f;
  --line: #d9d7cf;
  --accent: #1f5f4a;
  --accent-ink: #ffffff;
  --warn: #9a3412;
  --bar: #cfe3da;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141614;
  --card: #1e211e;
  --ink: #ecece6;
  --soft: #a2a69d;
  --line: #353a35;
  --accent: #7fcfae;
  --accent-ink: #10241c;
  --warn: #fdba74;
  --bar: #2c463b;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141614;
    --card: #1e211e;
    --ink: #ecece6;
    --soft: #a2a69d;
    --line: #353a35;
    --accent: #7fcfae;
    --accent-ink: #10241c;
    --warn: #fdba74;
    --bar: #2c463b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}
[hidden] { display: none !important; }
.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 700; letter-spacing: 0.02em; font-size: 1.15rem; }
.where { color: var(--soft); flex: 1; }
main { max-width: 44rem; margin: 0 auto; padding: 1rem; }
body.presenter main { max-width: 72rem; }
h1 { font-size: 1.35rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
p { margin: 0.4rem 0; }
.soft { color: var(--soft); font-size: 0.9rem; }
.error { color: var(--warn); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
label { display: block; margin: 0.8rem 0 0.25rem; font-weight: 600; }
input, textarea, select {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.65rem 0.7rem;
}
textarea { min-height: 7rem; resize: vertical; }
button {
  font: inherit;
  font-weight: 600;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 0.45rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button.quiet, button.plain {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
button.quiet { min-height: 2.2rem; padding: 0.3rem 0.7rem; font-weight: 500; }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
form button[type="submit"] { margin-top: 1rem; width: 100%; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.slide { padding: 0.75rem 1rem; }
.slide img { display: block; width: 100%; height: auto; border-radius: 0.35rem; }
.slide .number { color: var(--soft); font-size: 0.9rem; }
.slide .title { font-weight: 600; }
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}
.tabs button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  min-height: 2.5rem;
}
.tabs button[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list > li { padding: 0.6rem 0; border-top: 1px solid var(--line); }
ul.list > li:first-child { border-top: 0; }
.choice {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 0.5rem;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
}
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.choice .note { display: block; color: var(--soft); font-size: 0.88rem; font-weight: 400; }
.bar-row { margin: 0.55rem 0; }
.bar-row .label { display: flex; justify-content: space-between; gap: 1rem; }
.bar { height: 0.7rem; background: var(--bar); border-radius: 0.35rem; min-width: 2px; }
.big { font-size: 1.5rem; font-weight: 650; line-height: 1.25; }
.count { font-variant-numeric: tabular-nums; font-weight: 650; }
.cols { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  body.presenter { font-size: 1.15rem; }
  body.presenter .cols { grid-template-columns: 1fr 2fr; align-items: start; }
  body.presenter .big { font-size: 2.1rem; }
}
