/*
 * Öffentliche Newsletter-Seiten (Anmelden, Bestätigen, Abmelden, Einstellungen; Eigenversand 13).
 * Kähler-Tokens wie in frontend/src/lib/design/tokens.css, nur hell (die Seiten folgen nicht dem
 * Dunkelmodus der App). Ohne Skripte, ohne fremde Quellen. Breite 640 px, mobil ab 320 px.
 */
@font-face {
	font-family: 'Saira';
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url('/nl/static/saira-latin-wght-normal.woff2') format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Saira';
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url('/nl/static/saira-latin-ext-wght-normal.woff2') format('woff2-variations');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	color-scheme: light;
	--bg: #f5f9fa;
	--surface: #ffffff;
	--sunken: #eaf1f3;
	--text: #313942;
	--muted: #5f6b75;
	--border: #c9d3d8;
	--border-strong: #7d8a93;
	--accent: #17768c;
	--accent-hover: #12657a;
	--accent-subtle: #e3f2f6;
	--focus: #17768c;
	--danger: #b3261e;
	--danger-subtle: #fbeceb;
	--success: #16635a;
	--success-subtle: #e4f1ef;
	--warning: #8a5a00;
	--warning-subtle: #fbf2df;
	--brand: linear-gradient(100deg, #009c96 0%, #36aea6 45%, #2a9fbc 75%, #16635a 100%);
	--radius: 8px;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Saira', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 16px 32px;
}

.brand {
	display: block;
	width: 168px;
	margin: 0 auto 24px;
}
.brand img {
	display: block;
	width: 100%;
	height: auto;
}

.card {
	width: 100%;
	max-width: 640px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.card::before {
	content: '';
	display: block;
	height: 4px;
	background: var(--brand);
}
.card-body {
	padding: 32px 40px 36px;
}

h1 {
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 650;
	letter-spacing: -0.01em;
}
p {
	margin: 0 0 14px;
}
.lead {
	color: var(--muted);
	margin-bottom: 24px;
}
.muted {
	color: var(--muted);
	font-size: 14px;
}
a {
	color: var(--accent);
	text-underline-offset: 2px;
}
a:hover {
	color: var(--accent-hover);
}
:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.address {
	font-weight: 600;
	word-break: break-all;
}

/* ---------- Formular ---------- */
form {
	margin: 0;
}
.fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 16px;
	margin-bottom: 20px;
}
.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.field.wide {
	grid-column: 1 / -1;
}
label,
.label {
	font-weight: 600;
	font-size: 15px;
}
.optional {
	font-weight: 400;
	color: var(--muted);
}
input[type='text'],
input[type='email'],
select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--border-strong);
	border-radius: 6px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
}
input[type='text']:focus,
input[type='email']:focus,
select:focus {
	outline: 3px solid var(--focus);
	outline-offset: 1px;
	border-color: var(--focus);
}
input[aria-invalid='true'] {
	border-color: var(--danger);
}
.field-error {
	color: var(--danger);
	font-size: 14px;
	margin: 0;
}

.consents {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 4px 0 20px;
	padding: 0;
	border: 0;
}
.consents legend {
	padding: 0;
	margin-bottom: 6px;
	font-weight: 600;
}
.check {
	display: grid;
	grid-template-columns: 24px 1fr;
	gap: 12px;
	align-items: start;
	padding: 14px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	font-weight: 400;
	font-size: 15px;
	line-height: 1.5;
	cursor: pointer;
}
.check input {
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	accent-color: var(--accent);
	cursor: pointer;
}
.check .tag {
	display: block;
	margin-bottom: 2px;
	font-weight: 600;
}
.check.invalid {
	border-color: var(--danger);
	background: var(--danger-subtle);
}

.trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 8px;
}
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 24px;
	border: 1px solid var(--accent);
	border-radius: 6px;
	background: var(--accent);
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.button:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #ffffff;
}
.button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}
.button.secondary {
	background: var(--surface);
	color: var(--accent);
}
.button.secondary:hover {
	background: var(--accent-subtle);
	color: var(--accent-hover);
}

.notice {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--accent-subtle);
	font-size: 15px;
}
.notice.error {
	background: var(--danger-subtle);
	border-color: var(--danger);
}
.notice.warning {
	background: var(--warning-subtle);
	border-color: #d9b46a;
}

.status-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--success-subtle);
	color: var(--success);
}
.status-icon.mail {
	background: var(--accent-subtle);
	color: var(--accent);
}
.status-icon.neutral {
	background: var(--sunken);
	color: var(--muted);
}
.status-icon svg {
	width: 26px;
	height: 26px;
}

.text-box {
	margin: 0 0 20px;
	padding: 14px 16px;
	border-left: 4px solid var(--accent);
	background: var(--bg);
	font-size: 15px;
}
.text-box .tag {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.reasons {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}
.reasons legend {
	padding: 0;
	margin-bottom: 8px;
	font-weight: 600;
}
.radio {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	font-weight: 400;
	cursor: pointer;
}
.radio input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--accent);
}

.foot {
	width: 100%;
	max-width: 640px;
	margin-top: 20px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}
.foot a {
	color: var(--muted);
}

.preview-banner {
	width: 100%;
	max-width: 640px;
	margin: 0 0 16px;
	padding: 8px 14px;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	color: var(--muted);
	font-size: 14px;
	text-align: center;
}

/* Eingebettet (iframe auf der Website): ohne Logo und Rahmen, randnah */
.embed .page {
	min-height: 0;
	padding: 0;
	align-items: stretch;
}
.embed body,
body.embed {
	background: transparent;
}
.embed .card {
	max-width: none;
	border: 0;
	border-radius: 0;
}
.embed .card::before {
	display: none;
}
.embed .card-body {
	padding: 4px 2px 8px;
}
.embed h1 {
	font-size: 24px;
}

@media (max-width: 560px) {
	.page {
		padding: 24px 16px 24px;
	}
	.brand {
		width: 140px;
		margin-bottom: 20px;
	}
	.card-body {
		padding: 24px 20px 28px;
	}
	h1 {
		font-size: 24px;
	}
	.fields {
		grid-template-columns: 1fr;
	}
	.actions .button {
		width: 100%;
	}
}
