:root {
  --bg: #f5f7f9;
  --panel: #ffffff;
  --ink: #18202a;
  --muted: #657184;
  --line: #dfe5ec;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --ok: #047857;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: var(--brand-dark);
  font-weight: 650;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 48px);
}

.site-header h1 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  margin: 4px 0 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.top-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-nav a,
.top-nav button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 8px 10px;
}

.top-nav a:hover,
.top-nav button:hover {
  background: #eef4f4;
  text-decoration: none;
}

main {
  margin: 0 auto;
  max-width: 1280px;
  padding: 28px clamp(16px, 4vw, 48px) 64px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.05);
  margin-bottom: 20px;
  padding: 22px;
}

.panel h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.narrow {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}

.split {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
}

.grid.stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.stat strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.check,
.option {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check input,
.option input {
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

button,
.primary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7c3d0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
}

button.primary,
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

button:hover,
.primary:hover {
  filter: brightness(0.97);
  text-decoration: none;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

code {
  background: #eef2f6;
  border-radius: 6px;
  display: inline-block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 6px;
}

.muted {
  color: var(--muted);
}

.notice,
.success,
.important {
  border-color: rgba(15, 118, 110, 0.35);
}

.notice {
  background: #ecfdf5;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  color: var(--brand-dark);
  margin-bottom: 20px;
  padding: 12px 14px;
}

.error {
  background: #fff4f2;
  border-color: rgba(180, 35, 24, 0.28);
  color: var(--danger);
}

.success {
  color: var(--ok);
}

.back {
  display: inline-block;
  margin-bottom: 12px;
}

.flow {
  line-height: 1.7;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 14px 0;
  padding: 0;
}

.chips li {
  background: #eef4f4;
  border-radius: 999px;
  color: var(--brand-dark);
  font-weight: 700;
  padding: 7px 11px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ballot h2 {
  font-size: 24px;
}

@media (max-width: 860px) {
  .site-header,
  .split,
  .grid.stats {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    display: grid;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
