/* r4-vote — Defend Denmark styling (same tokens as the deck) */
:root {
	--red: hsl(0 75% 50%);
	--red-50: hsl(0 75% 96%);
	--red-100: hsl(0 75% 92%);
	--navy: hsl(210 83% 14%);
	--navy-70: hsl(210 83% 14% / 0.7);
	--navy-50: hsl(210 83% 14% / 0.5);
	--navy-15: hsl(210 83% 14% / 0.15);
	--blue: hsl(210 50% 35%);
	--blue-50: hsl(210 30% 95%);
	--bg: hsl(0 0% 98%);
	--border: hsl(0 0% 90%);
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
	min-height: 100vh;
	font-family: var(--sans);
	color: var(--navy);
	background-color: var(--bg);
	background-image: radial-gradient(circle at 1px 1px, hsl(0 75% 50% / 0.09) 1px, transparent 0);
	background-size: 24px 24px;
	-webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- vote page */
.wrap {
	max-width: 560px;
	margin: 0 auto;
	padding: 20px 20px 40px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.top {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--red);
	font-weight: 700;
	font-size: 17px;
}
.top img { width: 28px; height: 28px; }

.eyebrow {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0 0;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--red-50);
	border: 1px solid var(--red-100);
	color: var(--red);
	font-size: 14px;
	font-weight: 600;
}
.eyebrow i, .pill i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	animation: pulse 1.8s infinite;
}
@keyframes pulse {
	0% { box-shadow: 0 0 0 0 currentColor; }
	70%, 100% { box-shadow: 0 0 0 8px transparent; }
}

h1 {
	margin: 0;
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.opt {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--border);
	border-top: 4px solid var(--blue);
	border-radius: 14px;
	color: inherit;
	text-decoration: none;
}
.opt-b { border-top-color: var(--red); }
.opt.link:hover { box-shadow: 0 4px 20px -4px hsl(0 0% 0% / 0.12); }
.opt h2 { margin: 2px 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.opt p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--navy-70); }

.letter {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--blue);
	color: #fff;
	font-weight: 700;
	font-size: 20px;
}
.opt-b .letter, .col-b .letter { background: var(--red); }

.btn {
	width: 100%;
	height: 60px;
	border: 0;
	border-radius: 12px;
	background: var(--blue);
	color: #fff;
	font: 700 19px var(--sans);
	cursor: pointer;
	box-shadow: 0 10px 30px -10px hsl(210 50% 35% / 0.5);
	transition: transform 0.15s, opacity 0.2s;
}
.btn-b { background: var(--red); box-shadow: 0 10px 30px -10px hsl(0 75% 50% / 0.5); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
form { margin: 0; }

.status {
	margin: 0;
	padding: 12px 16px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--border);
	font-size: 15px;
}
.status.ok { background: var(--blue-50); border-color: hsl(210 30% 88%); }
.status.closed { background: var(--red-50); border-color: var(--red-100); }

.switch {
	align-self: center;
	font-size: 15px;
	color: var(--navy-70);
	text-decoration: none;
	border-bottom: 1px solid var(--navy-15);
}
.fine { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--navy-50); text-align: center; }

/* ---------------------------------------------------------------- results */
.results {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 14px;
}
.col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	min-height: 0;
}
.pct {
	font-size: 38px;
	font-weight: 700;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.track {
	position: relative;
	width: 72px;
	height: 120px;
	border-bottom: 1px solid var(--navy-15);
}
.fill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(var(--p, 0) * 1%);
	min-height: 2px;
	border-radius: 6px 6px 0 0;
	background: var(--blue);
	transition: height 0.8s var(--ease);
}
.col-b .fill { background: var(--red); }
.lbl {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
}
.lbl .letter { width: 30px; height: 30px; font-size: 14px; }
.cnt { font-size: 13px; color: var(--navy-50); font-variant-numeric: tabular-nums; }
.results.empty .pct { color: var(--navy-50); }

/* ---------------------------------------------------------------- live page */
.live {
	max-width: 900px;
	margin: 0 auto;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: 100vh;
}
.live h1 { font-size: 34px; }
.live-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--red-50);
	border: 1px solid var(--red-100);
	color: var(--red);
	font-weight: 700;
	font-size: 15px;
}
.pill.closed, .pill.offline { background: #f3f3f3; border-color: var(--border); color: var(--navy-50); }
.pill.closed i, .pill.offline i { animation: none; }
.total { font-size: 16px; font-weight: 600; color: var(--navy-70); font-variant-numeric: tabular-nums; }

.results.big { flex: 1; min-height: 0; gap: 28px; padding: 28px 20px; }
.results.big .col { justify-content: flex-end; }
.results.big .pct { font-size: 64px; }
.results.big .track { flex: 1; height: auto; width: 96px; min-height: 120px; }
.results.big .lbl { font-size: 19px; }
.results.big .lbl .letter { width: 36px; height: 36px; font-size: 17px; }
.results.big .cnt { font-size: 15px; }

/* Embedded in the slide: fill the iframe exactly, no page chrome */
body.embed { background: #fff; overflow: hidden; }
body.embed .live { min-height: 100vh; height: 100vh; max-width: none; padding: 22px 24px; }
body.embed .results.big { border: 0; padding: 8px 0 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the leading option reads a touch stronger (colour stays tied to the option) */
.results:not(.empty) .col:not(.lead) .pct { color: var(--navy-70); }
