/**
 * Legal / 404 / danke chrome — как Editin (nav, legal body, danke, totop).
 * Токены --ed-* зеркалят --ag-* из style.css.
 */

.ed {
	--ed-font: var(--ag-font, 'Space Grotesk', system-ui, sans-serif);
	--ed-primary: var(--ag-primary, #1a97fa);
	--ed-primary-md: var(--ag-primary-md, #5bb5fc);
	--ed-primary-lt: var(--ag-primary-lt, #e8f5ff);
	--ed-primary-dk: var(--ag-primary-dk, #0d6fb8);
	--ed-primary-xdk: var(--ag-primary-xdk, #074a7a);
	--ed-secondary: var(--ag-secondary, #3ebf9d);
	--ed-secondary-lt: var(--ag-secondary-lt, #c8fff1);
	--ed-text: var(--ag-text, #1a2129);
	--ed-text-2: var(--ag-text-2, #434d56);
	--ed-text-3: var(--ag-text-3, #5e6b74);
	--ed-gray-10: var(--ag-gray-10, #f6f6f6);
	--ed-gray-20: var(--ag-gray-20, #d9dee2);
	--ed-white: #fff;
	--ed-radius-control: var(--ag-radius, 4px);
	--ed-radius-card: var(--ag-radius, 4px);
	--ed-shadow-sm: var(--ag-shadow-sm);
	--ed-shadow-md: var(--ag-shadow-md);
	--ed-max: var(--ag-max, 1360px);
	--ed-nav-h: 64px;

	box-sizing: border-box;
	font-family: var(--ed-font);
	color: var(--ed-text);
	background: var(--ed-white);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

.ed *,
.ed *::before,
.ed *::after {
	box-sizing: border-box;
}

.ed img,
.ed svg {
	display: block;
	max-width: 100%;
}

.ed a {
	color: inherit;
	text-decoration: none;
}

body.page-template-page-legal,
body.page-template-page-legal-php,
body.page-template-page-danke-form,
body.page-template-page-danke-form-php,
body.page-danke-form,
body.page-impressum,
body.page-datenschutz,
body.page-agbs,
body.page-cookie-richtlinie,
body.error404 {
	margin: 0;
	background: #fff;
}

body.page-template-page-legal #page,
body.page-template-page-legal-php #page,
body.page-template-page-danke-form #page,
body.page-template-page-danke-form-php #page,
body.error404 #page {
	min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Nav (Editin pill)
   -------------------------------------------------------------------------- */
.ed-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 14px 0;
	background: #fff;
	border: 0;
	pointer-events: none;
	transition:
		padding 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ed-nav.is-scrolled {
	padding: 8px 0;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 8px 32px rgba(13, 111, 184, 0.08);
}

.ed-nav__pill {
	position: relative;
	pointer-events: auto;
	background: #fff;
	border-radius: var(--ed-radius-control);
	box-shadow: 0 10px 40px rgba(13, 111, 184, 0.12), 0 2px 8px rgba(13, 111, 184, 0.06);
	transition: box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ed-nav.is-scrolled .ed-nav__pill {
	box-shadow: 0 18px 48px rgba(13, 111, 184, 0.18), 0 4px 14px rgba(13, 111, 184, 0.08);
}

.ed-nav.is-open .ed-nav__pill {
	border-radius: var(--ed-radius-control);
	overflow: visible;
}

.ed-nav__row {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--ed-nav-h);
	padding: 8px 12px 8px 16px;
}

.ed-logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
	z-index: 1;
}

.ed-logo img,
.ed-logo .custom-logo {
	height: 36px;
	width: auto;
	max-width: min(210px, 58vw);
	object-fit: contain;
}

.ed-logo__text {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--ed-text);
	line-height: 1.2;
}

.ed-nav__links {
	display: none;
	align-items: center;
	gap: 28px;
	font-size: 16px;
	font-weight: 500;
	color: #6b7280;
}

.ed-nav__links a {
	position: relative;
	display: inline-block;
	transition: color 0.2s ease;
}

.ed-nav__links a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 2px;
	background: var(--ed-primary);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s ease;
	pointer-events: none;
}

.ed-nav__links a:hover,
.ed-nav__links a:focus-visible {
	color: var(--ed-primary);
}

.ed-nav__links a:hover::after,
.ed-nav__links a:focus-visible::after,
.ed-nav__links a.is-active::after,
.ed-nav__links a[aria-current='page']::after {
	transform: scaleX(1);
}

.ed-nav__links a.is-active,
.ed-nav__links a[aria-current='page'] {
	color: var(--ed-primary);
	font-weight: 600;
}

.ed-nav__cta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	z-index: 1;
}

.ed-nav__cta > .ed-btn {
	min-height: 44px;
	padding: 0 16px;
	font-size: 13px;
}

.ed-nav__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--ed-radius-control);
	background: transparent;
	cursor: pointer;
	color: var(--ed-text);
}

.ed-nav__toggle-bar {
	position: absolute;
	left: 10px;
	right: 10px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.ed-nav__toggle-bar:nth-child(1) {
	top: 14px;
}

.ed-nav__toggle-bar:nth-child(2) {
	top: 24px;
}

.ed-nav.is-open .ed-nav__toggle-bar:nth-child(1) {
	top: 19px;
	transform: rotate(45deg);
}

.ed-nav.is-open .ed-nav__toggle-bar:nth-child(2) {
	top: 19px;
	transform: rotate(-45deg);
}

.ed-nav__mobile {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% - 2px);
	z-index: 120;
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 4px 12px 14px;
	border-top: 1px solid rgba(46, 75, 196, 0.1);
	background: #fff;
	border-radius: 0 0 var(--ed-radius-control) var(--ed-radius-control);
	box-shadow: 0 16px 32px rgba(13, 111, 184, 0.12);
}

.ed-nav__mobile[hidden] {
	display: none !important;
}

.ed-nav__mobile a:not(.ed-btn) {
	padding: 8px 14px;
	font-weight: 600;
	font-size: 15px;
	color: var(--ed-text-2);
	border-radius: var(--ed-radius-control);
}

.ed-nav__mobile a:not(.ed-btn):hover {
	background: var(--ed-primary-lt);
	color: var(--ed-primary);
}

.ed-nav__mobile a.is-active,
.ed-nav__mobile a[aria-current='page'] {
	color: var(--ed-primary);
	font-weight: 600;
}

.ed-nav__mobile .ed-btn {
	margin-top: 8px;
	width: 100%;
}

@media (min-width: 1100px) {
	.ed-nav {
		padding: 18px 0;
	}

	.ed-nav.is-scrolled {
		padding: 10px 0;
	}

	.ed-nav__row {
		padding: 8px 14px 8px 22px;
	}

	.ed-logo img,
	.ed-logo .custom-logo {
		height: 40px;
		max-width: 220px;
	}

	.ed-nav__links {
		display: flex;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
	}

	.ed-nav__cta > .ed-btn {
		min-height: 48px;
		padding: 0 20px;
		font-size: 14px;
	}

	.ed-nav__toggle,
	.ed-nav__mobile {
		display: none !important;
	}
}

@media (max-width: 1099px) {
	.ed-nav__cta > .ed-btn {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Legal body
   -------------------------------------------------------------------------- */
.ed-legal {
	padding: 24px 0 72px;
}

.ed-legal__inner {
	max-width: var(--ed-max);
}

.ed-legal__header {
	margin-bottom: 28px;
}

.ed-legal__title {
	margin: 0;
	font-weight: 700;
	color: var(--ed-text);
}

.ed-legal__body {
	font-size: 16px;
	line-height: 1.65;
	color: var(--ed-text-2);
}

.ed-legal__body > *:first-child {
	margin-top: 0;
}

.ed-legal__body > *:last-child {
	margin-bottom: 0;
}

.ed .ed-legal__title,
.ed .ed-legal__body h1,
.ed .ed-legal__body h2,
.ed .ed-legal__body h3,
.ed .ed-legal__body h4,
.ed .ed-legal__body h5,
.ed .ed-legal__body h6 {
	margin: 1.75em 0 0.6em;
	color: var(--ed-text);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.ed .ed-legal__title,
.ed .ed-legal__body h1 {
	margin-top: 0;
	font-size: 50px;
	line-height: 1.15;
}

.ed .ed-legal__body h2 {
	font-size: 36px;
	line-height: 1.2;
}

.ed .ed-legal__body h3 {
	font-size: 26px;
}

.ed .ed-legal__body h4 {
	font-size: 20px;
	line-height: 1.35;
}

.ed .ed-legal__body h5 {
	font-size: 18px;
	line-height: 1.4;
}

.ed .ed-legal__body h6 {
	font-size: 14px;
	line-height: 1.45;
	font-weight: 600;
}

@media (max-width: 899px) {
	.ed .ed-legal__title,
	.ed .ed-legal__body h1 {
		font-size: clamp(1.75rem, 8vw, 50px);
	}

	.ed .ed-legal__body h2 {
		font-size: clamp(1.5rem, 6vw, 36px);
	}

	.ed .ed-legal__body h3 {
		font-size: clamp(1.25rem, 5vw, 26px);
	}
}

.ed-legal__body p,
.ed-legal__body ul,
.ed-legal__body ol {
	margin: 0 0 1em;
}

.ed-legal__body ul,
.ed-legal__body ol {
	padding-left: 15px;
	list-style-position: inside;
}

.ed-legal__body li + li {
	margin-top: 0.35em;
}

.ed-legal__body a {
	color: var(--ed-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ed-legal__body a:hover {
	color: var(--ed-primary-dk);
}

.ed-legal__body table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.25em;
	font-size: 0.95em;
}

.ed-legal__body th,
.ed-legal__body td {
	padding: 10px 12px;
	border: 1px solid var(--ed-gray-20);
	text-align: left;
	vertical-align: top;
}

.ed-legal__body th {
	background: var(--ed-gray-10);
	font-weight: 600;
	color: var(--ed-text);
}

@media (min-width: 768px) {
	.ed-legal {
		padding: 40px 0 96px;
	}
}

/* --------------------------------------------------------------------------
   Danke
   -------------------------------------------------------------------------- */
.ed--danke {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.ed-danke {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 150px 20px;
	box-sizing: border-box;
	background-color: #e8f3f8;
	background-image: var(--ed-danke-bg);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.ed-danke__overlay {
	position: absolute;
	inset: 0;
	background: rgba(7, 74, 122, 0.08);
	pointer-events: none;
	z-index: 0;
}

.ed-danke__card {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: min(560px, 100%);
	padding: 56px 48px;
	background: #fff;
	border-radius: var(--ed-radius-card);
	box-shadow: 0 24px 60px rgba(7, 74, 122, 0.18);
	text-align: center;
	box-sizing: border-box;
}

.ed .ed-danke__title {
	margin: 0;
	font-family: var(--ed-font);
	font-size: 35px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--ed-text);
}

.ed-danke__text {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ed-danke__text p {
	margin: 0;
	font-family: var(--ed-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--ed-text-2);
}

.ed-danke__btn {
	min-width: 200px;
	text-decoration: none;
}

.ed-btn__ico--leading {
	margin-left: 0;
	margin-right: 5px;
}

@media (max-width: 767px) {
	.ed-danke {
		padding: 80px 16px;
	}

	.ed-danke__card {
		width: 100%;
		padding: 36px 22px;
		gap: 20px;
	}

	.ed .ed-danke__title {
		font-size: 28px;
	}

	.ed-danke__text p {
		font-size: 15px;
	}

	.ed-danke__btn {
		width: 100%;
		min-width: 0;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.ed-danke__card {
		width: min(520px, 92%);
		padding: 48px 40px;
	}
}

/* --------------------------------------------------------------------------
   Totop
   -------------------------------------------------------------------------- */
.ed-totop {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 95;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(26, 151, 250, 0.25);
	border-radius: var(--ed-radius-control);
	background: var(--ed-primary);
	color: #fff;
	cursor: pointer;
	box-shadow: var(--ed-shadow-md);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ed-totop.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.ed-totop:hover {
	background: var(--ed-primary-dk);
}

.ed-totop[hidden] {
	display: none !important;
}
