/**
 * COMPLIANCE-PAGES (owner 2026-10-12, PAGE-DESIGN-CONTRACT.md): the one
 * shell of every compliance page — Impressum, Datenschutz, AGB, Herkunft
 * & Allergene and their drafts' previews. Rendered by the plugin's own
 * template (ComplianceShell), so no theme chrome needs hiding here.
 *
 * Same palette, type and brand lockup as the shop's legal pages since
 * ADR-033 (text only, the shop's brand bar, no photo), extended with the
 * way back and the list of legal pages. Everything is scoped to
 * body.rso-compliance-page; nothing else on the site is affected.
 */

body.rso-compliance-page {
	--rso-cp-bg: #faf9f3;
	--rso-cp-surface: rgba(255, 255, 255, 0.92);
	--rso-cp-ink: #23221c;
	--rso-cp-muted: #6b6853;
	--rso-cp-rule: #e7e4d8;
	--rso-cp-link: #35800a;
	--rso-cp-accent: #46a500;
	--rso-cp-chip: #ffffff;
	--rso-cp-note: #fff7e0;
	--rso-cp-note-border: #ecd9a0;
	--rso-cp-mark: #ffe08a;
	/* ≥ 3:1 against the page (WCAG 1.4.11); #46a500 was 2.99:1. */
	--rso-cp-focus: #35800a;
	/* White text on it ≥ 4.5:1 (the kiosk dialog's primary button). */
	--rso-cp-primary: #35800a;
	background: var(--rso-cp-bg);
	color: var(--rso-cp-ink);
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
	body.rso-compliance-page {
		--rso-cp-bg: #171713;
		--rso-cp-surface: rgba(23, 23, 19, 0.94);
		--rso-cp-ink: #eceade;
		--rso-cp-muted: #b5b19a;
		--rso-cp-rule: #33322a;
		--rso-cp-link: #8ed95e;
		--rso-cp-accent: #6cc832;
		--rso-cp-chip: #22221c;
		--rso-cp-note: #2c2717;
		--rso-cp-note-border: #5a4d22;
		--rso-cp-mark: #6b5a17;
		--rso-cp-focus: #8ed95e;
		--rso-cp-primary: #2d6b08;
	}
	/* The approved legal page's dark wordmark colours (legal-page.css). */
	.rso-compliance-page .rso-legal-word .w-rice { color: #6cc832; }
	.rso-compliance-page .rso-legal-word .w-spice { color: #8ed95e; }
	.rso-compliance-page .rso-legal-word .w-tld { color: #9b977f; }
}

body.rso-compliance-page *,
body.rso-compliance-page *::before,
body.rso-compliance-page *::after { box-sizing: border-box; }

/* Skip link: visible on focus only. */
.rso-cp-skip {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--rso-cp-ink);
	color: var(--rso-cp-bg);
	font-weight: 700;
	text-decoration: none;
}
.rso-cp-skip:focus { top: 12px; }

/* Header ----------------------------------------------------------------- */
.rso-cp-header {
	background: var(--rso-cp-surface);
	border-bottom: 1px solid var(--rso-cp-rule);
}
.rso-cp-header__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 12px 16px;
}
.rso-compliance-page .rso-legal-brand { display: inline-flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; border-radius: 8px; color: inherit; }
.rso-compliance-page .rso-legal-brand-row { display: flex; align-items: center; gap: 10px; }
.rso-compliance-page .rso-legal-mark svg { display: block; height: clamp(30px, 3.4vw, 40px); width: auto; }
.rso-compliance-page .rso-legal-word { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; letter-spacing: -.015em; }
.rso-compliance-page .rso-legal-word .w-rice { color: #46a500; }
.rso-compliance-page .rso-legal-word .w-spice { color: #35800a; }
.rso-compliance-page .rso-legal-word .w-tld { color: #8a8672; font-weight: 700; }
.rso-compliance-page .rso-legal-word-platform,
.rso-compliance-page .rso-legal-word-name { color: var(--rso-cp-ink); overflow-wrap: anywhere; }
.rso-compliance-page .rso-legal-logo img { display: block; height: clamp(30px, 3.4vw, 40px); width: auto; max-width: min(200px, 60vw); object-fit: contain; }
.rso-compliance-page .rso-legal-brand-address { font-size: .75rem; color: var(--rso-cp-muted); }

.rso-cp-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--rso-cp-rule);
	background: var(--rso-cp-chip);
	color: var(--rso-cp-ink);
	font-weight: 700;
	text-decoration: none;
	line-height: 1.2;
	max-width: 100%;
}
.rso-cp-back:hover { border-color: var(--rso-cp-accent); color: var(--rso-cp-link); }

.rso-cp-nav {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 10px;
}
.rso-cp-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rso-cp-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rso-cp-muted);
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
}
.rso-cp-nav a:hover { color: var(--rso-cp-link); text-decoration: underline; }
.rso-cp-nav a[aria-current="page"] {
	color: var(--rso-cp-ink);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.rso-compliance-page a:focus-visible,
.rso-compliance-page button:focus-visible,
.rso-cp-main:focus-visible {
	outline: 3px solid var(--rso-cp-focus);
	outline-offset: 3px;
}

/* Document ----------------------------------------------------------------- */
.rso-cp-main { display: block; outline: none; }
.rso-cp-document {
	max-width: 760px;
	margin: 0 auto;
	padding: 28px 16px 56px;
	line-height: 1.65;
	font-size: 1rem;
	overflow-wrap: break-word;
	hyphens: auto;
}
.rso-cp-title {
	margin: 0 0 18px;
	color: var(--rso-cp-ink);
	font-size: clamp(1.6rem, 3.4vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.2;
	hyphens: manual;
}
.rso-cp-content h2 { font-size: 1.15rem; font-weight: 700; margin: 30px 0 10px; color: var(--rso-cp-ink); line-height: 1.35; }
.rso-cp-content h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.rso-cp-content p { margin: 0 0 14px; }
.rso-cp-content ul { margin: 0 0 14px; padding-left: 22px; }
.rso-cp-content li { margin-bottom: 6px; }
.rso-cp-content a { color: var(--rso-cp-link); text-decoration: underline; text-underline-offset: 2px; }
.rso-cp-content a:hover { color: var(--rso-cp-ink); }
/* A phone number never breaks in the middle. */
.rso-cp-content a[href^="tel:"] { white-space: nowrap; }
/* An e-mail address is never hyphenated (a hyphen would look like part of it). */
.rso-cp-content a[href^="mailto:"] { hyphens: none; overflow-wrap: anywhere; }
.rso-cp-content strong { color: var(--rso-cp-ink); }
/* ADR-033: text only — no imagery inside a legal document. */
.rso-cp-content img,
.rso-cp-content picture,
.rso-cp-content iframe { display: none !important; }
.rso-cp-content figure { margin: 0 0 18px; }
.rso-cp-content table { width: 100%; border-collapse: collapse; font-size: .975rem; }
.rso-cp-content th,
.rso-cp-content td { padding: 9px 10px; border-bottom: 1px solid var(--rso-cp-rule); text-align: left; vertical-align: top; }
.rso-cp-content thead th { font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rso-cp-muted); }

/* In a kiosk session the DE/EN toggle floats in the top-right corner
   (UiLanguage::render_kiosk_toggle): keep the way back clear of it. */
body.rso-compliance-page:has(.rso-lang-kiosk) .rso-cp-header__bar { padding-right: 140px; }
@media (orientation: portrait) and (min-width: 900px) {
	body.rso-compliance-page:has(.rso-lang-kiosk) .rso-cp-header__bar { padding-right: 220px; }
}

/* Notices: private preview, honest language fallback, missing facts. */
.rso-cp-preview,
.rso-cp-language {
	margin: 0 0 20px;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--rso-cp-note-border);
	background: var(--rso-cp-note);
	font-size: .9375rem;
}
.rso-cp-approve-here { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rso-cp-check { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; padding-top: 10px; }
.rso-cp-approve-button {
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--rso-cp-primary);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.rso-cp-missing {
	padding: 1px 4px;
	border-radius: 4px;
	background: var(--rso-cp-mark);
	color: inherit;
	font-weight: 700;
}

/* 125.79 (owner 2026-10-24) "Allergene & Herkunft": the "on this page"
   jump links and the dish table. Scoped to the document column. */
.rso-cp-content .rso-cp-jump {
	margin: 0 0 22px;
	padding: 6px 14px;
	border: 1px solid var(--rso-cp-rule);
	border-radius: 12px;
	background: var(--rso-cp-surface);
}
.rso-cp-content .rso-cp-jump ul { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.rso-cp-content .rso-cp-jump li { margin: 0; }
/* A 44 px target for a finger (kiosk and phones). */
.rso-cp-content .rso-cp-jump a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
/* A jump target keeps a little room above it. */
.rso-cp-content h2[id] { scroll-margin-top: 16px; }
.rso-cp-content .rso-cp-matrix table { font-size: .9375rem; }
.rso-cp-content .rso-cp-matrix tbody th[scope="row"] { font-weight: 600; }
/* Column titles in normal case: the uppercase style of the origin table
   would make "Fleisch-/Fischherkunft" too wide for a phone (320 px). */
.rso-cp-content .rso-cp-matrix thead th { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.rso-cp-content .rso-cp-matrix .rso-cp-matrix__group th {
	padding-top: 20px;
	border-bottom: 2px solid var(--rso-cp-rule);
	color: var(--rso-cp-ink);
	font-size: 1rem;
	font-weight: 800;
}
@media (max-width: 480px) {
	.rso-cp-content .rso-cp-matrix table { font-size: .8125rem; }
	.rso-cp-content .rso-cp-matrix th,
	.rso-cp-content .rso-cp-matrix td { padding: 8px 5px; }
}

/* The site footer sits directly under the document. */
body.rso-compliance-page .rso-legal-footer { margin-top: 0; }

/* The kiosk popup frame (?rso_cp_embed=1): text only, the popup has the close button. */
body.rso-cp-embed .rso-cp-document { padding-top: 16px; }
body.rso-cp-embed .rso-lang-kiosk { display: none; }

/* Kiosk idle check (only inside a kiosk session). */
.rso-cp-idle {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .55);
}
.rso-cp-idle__card {
	width: min(420px, 100%);
	padding: 24px;
	border-radius: 16px;
	background: var(--rso-cp-bg);
	color: var(--rso-cp-ink);
	text-align: center;
}
.rso-cp-idle__card h2 { margin: 0 0 8px; font-size: 1.3rem; }
.rso-cp-idle__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.rso-cp-idle__actions button {
	min-height: 48px;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid var(--rso-cp-rule);
	background: var(--rso-cp-chip);
	color: var(--rso-cp-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.rso-cp-idle__actions button:first-child { background: var(--rso-cp-primary); border-color: var(--rso-cp-primary); color: #fff; }

@media (max-width: 480px) {
	.rso-cp-header__bar { padding: 10px 16px; }
	.rso-cp-back { padding: 8px 14px; }
	.rso-cp-document { padding-top: 22px; }
}

@media print {
	.rso-cp-header, .rso-cp-skip, .rso-legal-footer, .rso-cp-idle { display: none !important; }
	body.rso-compliance-page { background: #fff; color: #000; }
}
