/* Voting page in the look of honza-irl.com (palette "Tram and asphalt", pixel fonts). Loads after
 * /design/tokens.css, /design/components.css and the site's own site.css (header, menu, popups, footer).
 * Names, poll questions, options and messages are in Pixelify Sans (.ut): Silkscreen draws accents badly.
 * From 360 px without media queries (flex-wrap, minmax). */
[hidden] { display: none !important; }
.small { font-size: 15px; }
.num { font-variant-numeric: tabular-nums; }
.ut { font-family: var(--font-body); letter-spacing: 0; }
.phone-bar > :only-child { grid-column: 1 / -1; }

.vote-page { max-width: 760px; gap: 28px; }
.vote-page .card { width: calc(100% - 2 * var(--px)); }
.vote-page h2 { font-size: clamp(16px, 2.4vw, 20px); margin-bottom: 12px; color: var(--accent); }
.vote-page .card p + p { margin-top: 10px; }

.notice { margin: 0; padding: 12px 16px; background: var(--button); color: var(--button-text); font-family: var(--font-pixel);
          font-size: 15px; }
.notice.bad { background: var(--live); color: #FFFFFF; }

/* ---------- the open vote ---------- */
.kicker { font-size: 14px; letter-spacing: 1px; color: var(--accent); }
#poll-q { font-size: clamp(26px, 6vw, 40px); font-weight: 700; line-height: 1.15; margin: 8px 0 10px; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--muted); margin-bottom: 10px; }
#poll-time { color: var(--accent); }
#poll-time.low { color: var(--live); }
.options { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.option { width: calc(100% - 2 * var(--px)); margin: var(--px); display: flex; flex-direction: column; gap: 10px; min-height: 72px;
          padding: 16px; border: 0; cursor: pointer; text-align: left; font: inherit;
          color: var(--line); background: var(--bg); }
.option > * { color: var(--text); }
.option:hover:not(:disabled) { background: var(--card-hover); transform: translate(-2px, -2px); }
.option:disabled { cursor: default; }
.option[aria-pressed="true"] { color: var(--accent); }   /* the frame (currentColor) turns yellow */
.option.win { color: var(--accent); }
.opt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.opt-name { font-family: var(--font-body); font-size: 21px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.opt-n { font-family: var(--font-pixel); color: var(--accent); margin-right: 8px; }
.opt-pct { flex: 0 0 auto; font-family: var(--font-pixel); font-size: 18px; }
.opt-rule { font-size: 16px; color: var(--muted); }
.opt-mine { align-self: flex-start; padding: 2px 8px; background: var(--accent); color: var(--button-text); font-family: var(--font-pixel);
            font-size: 12px; letter-spacing: 1px; }
/* flat pixel bar. The width is set from JS (CSSOM, allowed by the CSP). */
.bar { display: flex; height: 14px; background: var(--card); overflow: hidden; }
.bar .b { height: 100%; background: var(--accent); transition: width .5s steps(5); }
.mine { margin-top: 16px; font-family: var(--font-body); font-weight: 700; color: var(--accent); }
.mine:empty { display: none; }

/* ---------- account, linked wallet ---------- */
.buttons { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.buttons .btn, .pop-body .buttons .btn { width: calc(100% - 2 * var(--px)); justify-content: flex-start; }
.linkbtn { background: none; border: 0; padding: 8px 0; min-height: var(--tap); color: var(--muted); font: inherit; font-size: 16px;
           text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.linkbtn:hover { color: var(--text); }
#who, #dlg-who { font-size: 20px; overflow-wrap: anywhere; }
.turnstile:not(:empty) { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .bar .b,   .option:hover:not(:disabled) { transform: none; }
}
