:root {
  --color-primary: #2d6a4f;
  --color-primary-dark: #1b4332;
  --color-bg: #f7f7f5;
  --color-border: #d9d9d4;
  --color-error-bg: #fdecea;
  --color-error-text: #a4201a;
  --color-info-bg: #eaf4ff;
  --color-info-text: #1b4965;
  --color-yes: #e6f4ea;
  --color-no: #fbe9e7;
  --color-maybe: #fff8e1;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: #222;
  margin: 0;
  padding: 2rem 1rem;
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 2rem;
}

.container-wide {
  max-width: 900px;
}

h1 {
  margin-top: 0;
  color: var(--color-primary-dark);
}

.description {
  color: #555;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
}

input[type="text"],
textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: normal;
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.option-row {
  margin-bottom: 0.5rem;
}

button {
  cursor: pointer;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  background: #fff;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.alert {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.alert-info {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.share-link code,
.alert code {
  background: #f1f1ef;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
}

.vote-table,
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.vote-table th,
.vote-table td,
.results-table th,
.results-table td {
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  text-align: center;
}

.vote-table td:first-child,
.results-table td:first-child,
.results-table th:first-child {
  text-align: left;
}

.table-scroll {
  overflow-x: auto;
}

.results-table .answer-yes {
  background: var(--color-yes);
}

.results-table .answer-no {
  background: var(--color-no);
}

.results-table .answer-maybe {
  background: var(--color-maybe);
}

.results-table .low-yes {
  background: #ffe0b2;
}

.results-table tfoot td {
  font-weight: 600;
}

.hint {
  color: #666;
  font-size: 0.9rem;
}
