/* Palette per visual-design-reference.md — WCAG AA verified (light theme colors
   corrected from the original mockup: --accent, --maybe, --warn-border). */
:root {
  --ink: #1F2421;
  --ink-soft: #5B6660;
  --accent: #b84e19;
  --accent-ink: #7A2E0E;
  --accent-tint: #FBE7DB;
  --accent-tint-border: #F0C6A8;
  --neutral-tint: #EEF0EC;
  --yes: #3F7A5A;
  --no: #B4483A;
  --maybe: #8c6823;
  --surface: #FFFFFF;
  --ground: #F5F1EA;
  --border: #E4DDD0;
  --warn-bg: #FBEFDC;
  --warn-border: #b68020;
  --warn-ink: #8A5A12;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #F2F0EA;
    --ink-soft: #A9B2AC;
    --accent: #EF7A3E;
    --accent-ink: #FFC79A;
    --accent-tint: rgba(239, 122, 62, 0.16);
    --accent-tint-border: #6B4022;
    --neutral-tint: #2E3531;
    --yes: #5FA37C;
    --no: #D97C6C;
    --maybe: #D9A94E;
    --surface: #242A27;
    --ground: #1B1F1D;
    --border: #3A423D;
    --warn-bg: #3A2E12;
    --warn-border: #6B4E1E;
    --warn-ink: #E8C27E;
  }
}

:root[data-theme='dark'] {
  --ink: #F2F0EA;
  --ink-soft: #A9B2AC;
  --accent: #EF7A3E;
  --accent-ink: #FFC79A;
  --accent-tint: rgba(239, 122, 62, 0.16);
  --accent-tint-border: #6B4022;
  --neutral-tint: #2E3531;
  --yes: #5FA37C;
  --no: #D97C6C;
  --maybe: #D9A94E;
  --surface: #242A27;
  --ground: #1B1F1D;
  --border: #3A423D;
  --warn-bg: #3A2E12;
  --warn-border: #6B4E1E;
  --warn-ink: #E8C27E;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
}

h1, h2, h3, .wordmark { font-family: 'Space Grotesk', sans-serif; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.pill-accent { background: var(--accent-tint); color: var(--accent-ink); }
.pill-neutral { background: var(--neutral-tint); color: var(--ink-soft); }

.btn {
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  height: 40px;
  padding: 0 18px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 500; }

.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--ink-soft); }

.page { max-width: 1000px; margin: 0 auto; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }
.page-header { display: flex; align-items: center; justify-content: space-between; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-tab.active { border-color: var(--accent); background: var(--accent); color: #fff; }

.poll-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.poll-card-info { display: flex; flex-direction: column; gap: 6px; }
.poll-card-actions { display: flex; gap: 16px; font-size: 13px; flex-shrink: 0; }
.tally-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
input[type='text'], input[type='password'], input[type='datetime-local'], textarea {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
textarea { height: auto; padding: 12px 14px; }

.warn-box {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--warn-ink);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--ground);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vote-choices { display: flex; gap: 8px; }
.vote-choice {
  flex: 1;
  height: 52px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.vote-choice.selected-yes { border-color: var(--yes); background: var(--yes); color: #fff; }
.vote-choice.selected-no { border-color: var(--no); background: var(--no); color: #fff; }
.vote-choice.selected-maybe { border-color: var(--maybe); background: var(--maybe); color: #fff; }

.flash { background: var(--accent-tint); border: 1px solid var(--accent-tint-border); border-radius: 12px; padding: 16px 20px; }

table.team-table { width: 100%; border-collapse: collapse; }
table.team-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 14px 12px; border-bottom: 1px solid var(--border); }
table.team-table td { padding: 16px 12px; border-bottom: 1px solid var(--border); }
