:root {
  --ground: #f3f1ec;
  --panel: #ffffff;
  --ink: #1f1d19;
  --muted: #6c675d;
  --rule: #dad6cc;
  --accent: #a8322a;
  --accent-ink: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header, main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header { padding-top: 1.25rem; }
h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
footer { padding: 2rem 1rem; text-align: center; }

/* ---- ask form ---- */
form#ask {
  margin-top: 1rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.75rem;
}
textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  font: inherit;
  padding: 0.25rem;
  outline: none;
  background: transparent;
  color: inherit;
}
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 0.25rem; }
button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
.notice { color: var(--accent); font-weight: 600; margin: 0.5rem 0 0; }

/* ---- question list ---- */
.questions { list-style: none; padding: 0; margin: 0; }
li.question {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
li.question .text { margin: 0.35rem 0; overflow-wrap: anywhere; }
li.question .vote {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2rem;
  padding: 0.35rem 0.4rem;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--rule);
  line-height: 1.1;
}
li.question .vote .count { font-size: 1.05rem; }
li.question.voted .vote { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.questions.answered li.question { opacity: 0.6; }

/* ---- presenter page ---- */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
td.actions { white-space: nowrap; }
td.actions button { padding: 0.3rem 0.6rem; margin-right: 0.25rem; font-size: 0.85rem; }
button.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); }
tr.hidden td { opacity: 0.45; text-decoration: line-through; }
tr.answered td.text { color: var(--muted); }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
input[type="password"] { font: inherit; padding: 0.5rem; border: 1px solid var(--rule); border-radius: 8px; }
