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

:root {
  --bg-page: #14121a;
  --bg-rgb: 20, 18, 26;
  --purple-rgb: 155, 111, 196;
  --sage-rgb: 134, 169, 144;
  --white: #f0eaf8;
  --white-rgb: 240, 234, 248;
  --legal-copy-color: rgba(var(--white-rgb), 0.9);
  --legal-heading-color: #fff;
  --legal-copy-weight: 400;
  --legal-heading-weight: 500;
  --legal-subheading-weight: 600;
  --legal-placeholder-color: #ff3333;
  --legal-muted-color: rgba(var(--white-rgb), 0.72);
  --border: rgba(240, 234, 248, 0.1);
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --legal-shell-max: 820px;
  --legal-content-max: 720px;
  --page-pad: clamp(24px, 5vw, 48px);
  --legal-anchor-offset: 72px;
  --legal-shell-fill:
    linear-gradient(180deg, rgba(240, 234, 248, 0.06), rgba(240, 234, 248, 0.02)),
    linear-gradient(145deg, rgba(var(--purple-rgb), 0.045), rgba(18, 16, 26, 0.04)),
    rgba(18, 16, 24, 0.36);
  --legal-shell-blur: 14px;
  --legal-shell-saturate: 0.88;
  --legal-shell-border: rgba(240, 234, 248, 0.1);
  --info-card-panel-blur: 11px;
  --frost-panel-border: 1px solid rgba(var(--white-rgb), 0.18);
  --frost-panel-bg:
    radial-gradient(circle at 88% 10%, rgba(var(--sage-rgb), 0.1), transparent 46%),
    radial-gradient(circle at 12% 92%, rgba(var(--purple-rgb), 0.06), transparent 50%),
    linear-gradient(168deg, rgba(var(--white-rgb), 0.13) 0%, rgba(var(--white-rgb), 0.04) 48%),
    rgba(32, 38, 36, 0.26);
  --frost-panel-shadow:
    inset 0 1px 0 rgba(var(--white-rgb), 0.14),
    0 10px 32px rgba(0, 0, 0, 0.12);
}

html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg-page);
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--legal-copy-color);
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--legal-copy-weight);
  font-synthesis: weight;
  letter-spacing: 0.02em;
  line-height: 1.72;
  background: var(--bg-page);
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

.legal-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #6f7072;
}

.legal-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: translateZ(0);
  filter: saturate(0.9) brightness(0.98);
}

.legal-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 16, 26, 0.08), rgba(18, 16, 26, 0.16)),
    rgba(22, 19, 32, 0.06);
}

.legal-shell {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--legal-shell-max));
  margin: 0 auto;
  overflow: hidden;
  border-left: 1px solid var(--legal-shell-border);
  border-right: 1px solid var(--legal-shell-border);
  background: var(--legal-shell-fill);
  -webkit-backdrop-filter: blur(var(--legal-shell-blur)) saturate(var(--legal-shell-saturate));
  backdrop-filter: blur(var(--legal-shell-blur)) saturate(var(--legal-shell-saturate));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 80px rgba(0, 0, 0, 0.14);
}

.legal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-padding-top: 8px;
}

a {
  color: var(--legal-copy-color);
  text-decoration: underline;
  text-decoration-color: rgba(var(--white-rgb), 0.28);
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: rgba(var(--white-rgb), 0.94);
  text-decoration-color: rgba(var(--white-rgb), 0.5);
  outline: none;
}

.legal-topbar {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top, 0px)) var(--page-pad) 14px;
  border-bottom: 1px solid var(--legal-shell-border);
  background: rgba(18, 16, 24, 0.22);
  -webkit-backdrop-filter: blur(calc(var(--legal-shell-blur) + 2px)) saturate(var(--legal-shell-saturate));
  backdrop-filter: blur(calc(var(--legal-shell-blur) + 2px)) saturate(var(--legal-shell-saturate));
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.legal-brand-logo {
  display: block;
  width: auto;
  height: 32px;
}

.legal-back {
  color: rgba(var(--white-rgb), 0.88);
  font-size: 14px;
  font-weight: 450;
  font-synthesis: weight;
  letter-spacing: 0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.legal-back:hover,
.legal-back:focus-visible {
  color: rgba(var(--white-rgb), 0.98);
}

.legal-page {
  max-width: var(--legal-content-max);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 56px) var(--page-pad) max(48px, env(safe-area-inset-bottom, 0px));
}

.legal-page-head {
  margin-bottom: clamp(28px, 5vh, 44px);
}

.legal-page-title {
  margin: 0 0 10px;
  color: var(--legal-heading-color);
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: var(--legal-heading-weight);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.legal-page-lead {
  margin: 0;
  color: var(--legal-copy-color);
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 clamp(36px, 6vh, 56px);
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: inline-block;
  padding: 6px 0;
  color: rgba(var(--white-rgb), 0.88);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: rgba(var(--white-rgb), 1);
  outline: none;
}

.legal-section {
  scroll-margin-top: var(--legal-anchor-offset);
  padding-top: clamp(48px, 4vh, 60px);
  padding-bottom: 20px;
  border-top: 1px solid var(--border);
}

.legal-section:first-of-type:not(.legal-frost-stack .legal-section) {
  padding-top: 0;
  border-top: 0;
}

/* Frost-Stack: Impressum + Datenschutz + AGB in einem Panel. */
.legal-frost-stack.legal-frost-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: clamp(8px, 1.6vh, 14px) 0 0;
  padding: clamp(24px, 3.2vw, 32px) clamp(24px, 3.4vw, 34px);
  border: var(--frost-panel-border);
  border-radius: 28px;
  background: var(--frost-panel-bg);
  box-shadow: var(--frost-panel-shadow);
  -webkit-backdrop-filter: blur(var(--info-card-panel-blur)) saturate(1.08);
  backdrop-filter: blur(var(--info-card-panel-blur)) saturate(1.08);
}

.legal-frost-stack .legal-section {
  scroll-margin-top: var(--legal-anchor-offset);
  margin: 0;
  padding: clamp(28px, 3.6vh, 36px) 0;
  border: 0;
  border-top: 1px solid rgba(var(--white-rgb), 0.1);
}

.legal-frost-stack .legal-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.legal-section h2 {
  margin: 0 0 18px;
  color: var(--legal-heading-color);
  font-size: clamp(1.28rem, 2.8vw, 1.5rem);
  font-weight: var(--legal-heading-weight);
  font-synthesis: weight;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.legal-section h3 {
  margin: 28px 0 10px;
  color: var(--legal-heading-color);
  font-size: 1rem;
  font-weight: var(--legal-subheading-weight);
  font-synthesis: weight;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.legal-section h4 {
  margin: 22px 0 8px;
  color: var(--legal-heading-color);
  font-size: 0.94rem;
  font-weight: var(--legal-subheading-weight);
  font-synthesis: weight;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.legal-section p,
.legal-section li {
  margin: 0 0 14px;
  color: var(--legal-copy-color);
  font-weight: var(--legal-copy-weight);
  font-synthesis: weight;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 14px;
  padding-left: 1.25rem;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-meta {
  margin: 0 0 20px;
  color: var(--legal-copy-color);
  font-size: 14px;
  font-weight: var(--legal-copy-weight);
  font-synthesis: weight;
  letter-spacing: 0.04em;
}

.legal-placeholder {
  color: var(--legal-placeholder-color);
  font-style: italic;
  font-weight: var(--legal-copy-weight);
  font-synthesis: weight;
}

.legal-note {
  margin: 0 0 18px;
  color: rgba(var(--white-rgb), 0.62);
  font-size: 15px;
  line-height: 1.55;
}

.legal-form-block {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--white-rgb), 0.1);
  border-radius: 8px;
  background: rgba(var(--white-rgb), 0.03);
  color: rgba(var(--white-rgb), 0.72);
  font-size: 15px;
  line-height: 1.55;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.legal-table th,
.legal-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  color: var(--legal-copy-color);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--legal-heading-color);
  font-weight: 500;
  background: rgba(var(--white-rgb), 0.05);
}

.legal-foot {
  margin-top: clamp(40px, 7vh, 64px);
  margin-bottom: 0;
  padding-bottom: clamp(8px, 2vh, 20px);
  text-align: right;
  color: rgba(var(--white-rgb), 0.46);
  font-size: 12px;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

@media (min-width: 900px) {
  .legal-shell {
    --legal-shell-max: 860px;
  }
}

@media (max-width: 899px) {
  .legal-shell {
    width: 100%;
    border-left: 0;
    border-right: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --legal-anchor-offset: 64px;
  }

  .legal-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

html.is-embed {
  height: 100%;
  overflow: hidden;
  background: transparent;
}

html.is-embed body {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: transparent;
}

.legal-shell:has(.legal-frost-stack) {
  border-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

html.is-embed .legal-frost-stack.legal-frost-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}

html.is-embed .legal-shell {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

html.is-embed .legal-scroll {
  height: 100%;
  scroll-padding-top: 12px;
  background: transparent;
}

html.is-embed .legal-page {
  max-width: none;
  padding: clamp(52px, 8vw, 84px) clamp(34px, 6vw, 72px) max(32px, env(safe-area-inset-bottom, 0px));
}

html.is-embed {
  --legal-anchor-offset: 20px;
}
