:root { --ink: #1f2933; --muted: #5f6c7b; --line: #d9dfe5; --accent: #1f4e79; --bg: #fff; --soft: #f3f6f9;
  --yes: #15803d; --yes-dark: #116530; --no: #b91c1c; --no-dark: #991515; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 40rem; margin: 0 auto; padding: 4rem 1.25rem; }
main.wide { max-width: 60rem; }
h1 { margin: 0 0 .5rem; font-size: 2rem; line-height: 1.2; }
h2 { margin: 2.5rem 0 1rem; font-size: 1.25rem; }
.lede, .muted { color: var(--muted); }
.lede { margin: 0 0 2rem; }
.role-label { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.roles a { display: block; padding: 2rem 1rem; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); font-size: 1.25rem; font-weight: 600; text-align: center; text-decoration: none; }
.roles a:hover, .roles a:focus-visible { border-color: var(--accent); background: var(--soft); }
.back { display: inline-block; margin-bottom: 2rem; color: var(--muted); font-size: .9rem; }

.field { margin: 0 0 1.25rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; }
select { width: 100%; padding: .75rem 2.5rem .75rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6c7b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1rem center;
  appearance: none; color: var(--ink); font: inherit; cursor: pointer; }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
select:invalid { color: var(--muted); }

button.big { display: block; width: 100%; padding: 1.1rem; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-size: 1.25rem; font-weight: 700; cursor: pointer; }
button.big:disabled { opacity: .4; cursor: not-allowed; }
button.big.yes { background: var(--yes); } button.big.yes:hover:not(:disabled) { background: var(--yes-dark); }
button.big.no { background: var(--no); } button.big.no:hover:not(:disabled) { background: var(--no-dark); }
button.big.quiet { background: var(--bg); color: var(--accent); border: 1px solid var(--line); }
button.big.quiet:hover:not(:disabled) { background: var(--soft); }
.vote-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }

table.proposal { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
table.proposal th, table.proposal td { padding: .6rem .25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.proposal th { font-weight: 400; color: var(--muted); }
table.proposal td { font-weight: 700; text-align: right; }

.waiting { padding: 2rem 1rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; font-size: 1.15rem; }
.waiting ul { list-style: none; margin: .75rem 0 0; padding: 0; color: var(--ink); font-weight: 600; }
.dots::after { content: ""; animation: dots 1.5s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.notice { margin: 1rem 0; color: var(--muted); text-align: center; }

.result { margin: 1.5rem 0; padding: 2rem 1rem; border-radius: 8px; color: #fff; text-align: center; }
.result.pass { background: var(--yes); } .result.fail { background: var(--no); }
.result strong { display: block; font-size: 2rem; line-height: 1.2; }
.result span { opacity: .9; }

/* admin */
.card { margin: 0 0 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; }
.card h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; color: #fff; background: var(--muted); }
.pill.pass, .pill.yes { background: var(--yes); } .pill.fail, .pill.no { background: var(--no); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.cols table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cols th, .cols td { padding: .35rem .25rem; border-bottom: 1px solid var(--line); text-align: left; }
.cols td:last-child { text-align: right; }
.cols th { color: var(--muted); font-weight: 400; }
