/*
 * Partnerportal einfach-elterngeld.de
 * Gestaltung angelehnt an einfach-elterngeld.de und das Terminportal:
 * Open Sans (selbst gehostet), Rot #B93022, weiße Karten mit Schatten.
 */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/open-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/open-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/open-sans-700.woff2") format("woff2");
}

:root {
  --red: #b93022;
  --red-hover: #92261c;
  --red-soft: #fbeeec;
  --red-tint: #f6e3e0;
  --text: #191919;
  --muted: #595959;
  --border: #dedede;
  --border-strong: #c4c4c4;
  --page: #f6f5f3;
  --white: #ffffff;
  --success: #1f6f2d;
  --success-bg: #e3f4e6;
  --warning: #7a4b00;
  --warning-bg: #fff3d6;
  --info: #1d4f7a;
  --info-bg: #e5f0fa;
  --error: #8f1d12;
  --error-bg: #fbe3e0;
  --shadow: 0 2px 10px rgba(60, 69, 106, 0.12);
  --shadow-hover: 0 10px 30px rgba(60, 69, 106, 0.18);
  --radius: 12px;
  --radius-small: 8px;
  --container: 1120px;
}

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

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

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Hintergrundgrafik (wie Terminportal und einfach-elterngeld.de) auf allen
   Seiten; fest stehend über eine eigene Ebene, weil
   background-attachment: fixed auf iOS nicht greift */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #fff url("/static/img/hintergrund.svg") center / cover no-repeat;
  pointer-events: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--red);
}

a:hover {
  color: var(--red-hover);
}

:focus-visible {
  outline: 3px solid #1d4f7a;
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius-small);
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.pre {
  white-space: pre-line;
}

.text-error {
  color: var(--error);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button--primary {
  color: var(--white);
  background: var(--red);
}

.button--primary:hover:not(:disabled) {
  color: var(--white);
  background: var(--red-hover);
}

.button--ghost {
  color: var(--red);
  background: var(--white);
  border-color: var(--red);
}

.button--ghost:hover:not(:disabled) {
  color: var(--white);
  background: var(--red);
}

.button--light {
  color: var(--red);
  background: var(--white);
}

.button--light:hover {
  color: var(--red-hover);
  background: var(--red-soft);
}

.button--danger {
  color: var(--white);
  background: var(--error);
}

.button--danger-ghost {
  color: var(--error);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.button--danger-ghost:hover:not(:disabled) {
  background: var(--error-bg);
}

.button--large {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 1.05rem;
}

.button--small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.875rem;
}

.button--block {
  width: 100%;
}

.link-button {
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--red);
}

/* Hinweisleisten */

.preview-banner {
  padding: 8px 16px;
  color: var(--white);
  background: #3c3c3c;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.preview-banner a {
  color: var(--white);
}

.notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid;
  border-radius: var(--radius-small);
}

.notice p:last-child,
.notice ul:last-child {
  margin-bottom: 0;
}

.notice ul {
  margin: 0;
  padding-left: 20px;
}

.notice--success {
  color: var(--success);
  background: var(--success-bg);
}

.notice--error {
  color: var(--error);
  background: var(--error-bg);
}

.notice--warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.notice--info {
  color: var(--info);
  background: var(--info-bg);
}

/* ------------------------------------------------------------------
 * Öffentliche Seiten
 * ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 3px solid var(--red);
  backdrop-filter: saturate(1.4) blur(6px);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 76px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 132px;
  height: auto;
}

.site-brand__label {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}

/* Sprachumschalter mit Flagge (wie im Terminportal) */
.flag {
  flex: 0 0 auto;
  width: 21px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.language-switch:hover {
  color: var(--red);
  text-decoration: underline;
}

.partner-card__language {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

.language-notice {
  margin-top: 16px;
  margin-bottom: 0;
}

.language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.language-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 16px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.language-tabs a[aria-current="page"] {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red);
}

.language-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: -8px 0 24px;
  font-size: 0.9rem;
}

.language-status span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.site-header__link {
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-header__link:hover {
  color: var(--red);
  text-decoration: underline;
}

/* Fußzeile immer am unteren Rand: Seite als Spalte, Inhalt füllt den Rest */
body.public,
body.backoffice {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.public > main,
body.backoffice > main {
  flex: 1 0 auto;
}

body.public > main {
  display: flex;
  flex-direction: column;
}

body.public > main > * {
  width: 100%;
}

body.public > main > .container {
  width: min(100% - 32px, var(--container));
}

body.public > main {
  padding-bottom: 64px;
}

/* Endet die Seite mit dem roten Kasten, schließt die Fußzeile direkt an */
body.public > main:has(> .become-partner:last-child) {
  padding-bottom: 0;
}

.site-footer {
  flex-shrink: 0;
  padding: 28px 0;
  background: rgba(246, 245, 243, 0.88);
  border-top: 1px solid #ececec;
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer__copy {
  margin: 0;
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer__links a {
  color: var(--muted);
}

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* Startseite */

.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px);
  background: radial-gradient(circle at 85% 20%, rgba(251, 238, 236, 0.7) 0, transparent 45%);
  text-align: center;
}

.hero__inner {
  max-width: 820px;
}

.hero__lead {
  margin: 0 auto;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.1rem;
}

.section {
  padding-top: 32px;
  padding-bottom: 64px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
}

.filter-chip:hover {
  color: var(--red);
  border-color: var(--red);
}

.filter-chip[aria-current="page"] {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.filter-chip__count {
  min-width: 22px;
  margin-left: 8px;
  padding: 0 7px;
  color: var(--muted);
  background: var(--page);
  border-radius: 999px;
  font-size: 0.8rem;
  text-align: center;
}

.filter-chip[aria-current="page"] .filter-chip__count {
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner-card {
  display: flex;
}

.partner-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 24px;
  color: var(--text);
  background: var(--white);
  border: 1px solid #ececec;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.partner-card__link:hover {
  color: var(--text);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.partner-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.partner-card__top--plain {
  justify-content: flex-end;
  margin-bottom: 4px;
}

.partner-card__logo {
  display: flex;
  align-items: center;
  min-height: 56px;
}

.card-logo {
  display: block;
  max-width: 190px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.card-logo--text,
.hero-logo--text {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ad-label {
  flex: 0 0 auto;
  padding: 2px 8px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.partner-card__category {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.partner-card__title {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 4px 12px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge--large {
  padding: 6px 16px;
  font-size: 1rem;
}

.partner-card__teaser {
  flex: 1 1 auto;
  color: var(--muted);
}

.partner-card__more {
  margin-top: 8px;
  color: var(--red);
  font-weight: 700;
}

.empty-state {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
  background: var(--page);
  border-radius: var(--radius);
  text-align: center;
}

.disclosure-note {
  max-width: 820px;
  margin: 40px auto 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Logo-Leiste (läuft endlos; ohne Bewegung bei „Bewegung reduzieren“) */

.logo-band {
  overflow: hidden;
  padding: 22px 0;
  background: rgba(255, 255, 255, 0.85);
  border-block: 1px solid #ececec;
}

.logo-band__track {
  display: flex;
  width: max-content;
  animation: logo-scroll 40s linear infinite;
}

.logo-band:hover .logo-band__track,
.logo-band:focus-within .logo-band__track {
  animation-play-state: paused;
}

.logo-band__list {
  display: flex;
  align-items: center;
  gap: 64px;
  margin: 0;
  padding: 0 32px;
  list-style: none;
}

.logo-band__list a {
  display: block;
}

.logo-band__logo {
  display: block;
  max-width: 180px;
  max-height: 48px;
  width: auto;
  height: auto;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.logo-band__list a:hover .logo-band__logo,
.logo-band__list a:focus .logo-band__logo {
  filter: none;
  opacity: 1;
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-band__track {
    animation: none;
    width: auto;
    justify-content: center;
    flex-wrap: wrap;
  }

  .logo-band__list[aria-hidden="true"] {
    display: none;
  }

  .logo-band__list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 24px;
  }

  .partner-card__link,
  .button {
    transition: none;
  }
}

.become-partner {
  /* Freier Platz auf hohen Bildschirmen liegt über dem Kasten,
     der Kasten schließt direkt an die Fußzeile an */
  margin-top: auto;
  padding: 40px 0;
  color: var(--white);
  background: var(--red);
}

.become-partner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.become-partner__inner > div {
  max-width: 700px;
}

.become-partner h2 {
  margin-bottom: 8px;
}

.become-partner p {
  margin: 0;
  opacity: 0.92;
}

/* Landingpage */

.ad-strip {
  padding: 8px 0;
  color: var(--muted);
  background: rgba(246, 245, 243, 0.85);
  border-bottom: 1px solid #ececec;
  font-size: 0.85rem;
}

.breadcrumb {
  margin: 18px auto 0;
  font-size: 0.925rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--red);
  text-decoration: underline;
}

.landing-hero {
  padding: 28px 0 40px;
}

.landing-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.landing-hero__inner--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}

.landing-hero__logo {
  margin-bottom: 20px;
}

.hero-logo {
  display: block;
  max-width: 260px;
  max-height: 72px;
  width: auto;
  height: auto;
}

.landing-hero__lead {
  color: var(--muted);
  font-size: 1.1rem;
}

.landing-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 24px;
}

.cta-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.landing-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-body {
  max-width: 820px;
}

.block {
  margin: 0 0 40px;
}

.rich-text ul {
  margin: 0 0 1em;
  padding-left: 22px;
}

.rich-text p:last-child,
.rich-text ul:last-child {
  margin-bottom: 0;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 36px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: var(--red-soft);
  border-radius: 50%;
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

.check-list p,
.steps p {
  margin: 0;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 18px 14px 76px;
  background: var(--page);
  border-radius: var(--radius);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.block--highlight {
  padding: 22px 24px;
  background: var(--red-soft);
  border-left: 5px solid var(--red);
  border-radius: var(--radius-small);
}

.block--highlight h2 {
  font-size: 1.2rem;
}

.faq {
  margin: 0 0 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.faq summary {
  position: relative;
  padding: 14px 48px 14px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.faq[open] summary::after {
  content: "×";
}

.faq .rich-text {
  padding: 0 18px 16px;
  color: var(--muted);
}

.block--image img {
  display: block;
  border-radius: var(--radius);
}

.block--image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.block--image {
  margin-inline: 0;
}

/* Termine (z. B. Webinare) */

.event-list {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.event {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.event__date {
  display: flex;
  flex: 0 0 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius-small);
  line-height: 1.1;
}

.event__day {
  font-size: 1.5rem;
  font-weight: 700;
}

.event__month {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event__info p {
  margin: 0;
}

.event__when {
  color: var(--muted);
  font-size: 0.9rem;
}

.event__title {
  font-weight: 700;
}

.event__note {
  margin-top: 4px !important;
  color: var(--muted);
  font-size: 0.9rem;
}

.event-empty {
  color: var(--muted);
}

.event-editor {
  padding: 12px 14px 2px;
  margin-bottom: 12px;
  background: var(--page);
  border-radius: var(--radius-small);
}

.event-editor__when {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.event-editor__when .field {
  flex: 0 1 200px;
}

.block--cta {
  padding: 32px;
  background: var(--page);
  border-radius: var(--radius);
  text-align: center;
}

.block--cta .rich-text {
  margin-bottom: 20px;
  color: var(--muted);
}

.transparency {
  margin-top: 48px;
  padding: 20px 24px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-small);
  font-size: 0.9rem;
}

.transparency h2 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
}

.transparency p:last-child {
  margin-bottom: 0;
}

.legal,
.message-page {
  max-width: 820px;
  padding-top: 40px;
}

.legal h2 {
  margin-top: 32px;
  font-size: 1.25rem;
}

/* ------------------------------------------------------------------
 * Verwaltung und Partnerbereich
 * ------------------------------------------------------------------ */

body.backoffice {
  background: var(--white);
}

.bo-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
}

.bo-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  width: min(100% - 32px, 1280px);
  min-height: 68px;
  margin-inline: auto;
}

.bo-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.bo-brand img {
  display: block;
  width: 96px;
  height: auto;
}

.bo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
}

.bo-nav a {
  padding: 8px 14px;
  color: var(--text);
  border-radius: var(--radius-small);
  text-decoration: none;
}

.bo-nav a:hover {
  background: var(--page);
}

.bo-nav a[aria-current="page"] {
  color: var(--red);
  background: var(--red-soft);
  font-weight: 600;
}

.bo-user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.bo-user a {
  color: var(--muted);
}

.bo-user form {
  margin: 0;
}

.bo-main {
  width: min(100% - 32px, 980px);
  margin: 32px auto;
}

.bo-main--wide {
  width: min(100% - 32px, 1280px);
}

.bo-footer {
  flex-shrink: 0;
}

.bo-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 24px 16px 40px;
  font-size: 0.85rem;
}

.bo-footer a {
  color: var(--muted);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin-bottom: 8px;
  font-size: 1.9rem;
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backoffice h1 {
  font-size: 1.9rem;
}

.backoffice .breadcrumb {
  margin: 0 0 12px;
}

.panel {
  margin: 0 0 24px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel h2 {
  font-size: 1.25rem;
}

.panel__intro {
  color: var(--muted);
}

.panel--danger {
  border: 1px solid var(--error-bg);
}

.subpanel {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--page);
  border-radius: var(--radius-small);
}

.subpanel summary {
  font-weight: 600;
  cursor: pointer;
}

.subpanel form {
  margin-top: 14px;
}

.facts {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 8px 24px;
  margin: 0 0 16px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  color: var(--muted);
  background: #eeeeee;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip--success {
  color: var(--success);
  background: var(--success-bg);
}

.chip--warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.chip--info {
  color: var(--info);
  background: var(--info-bg);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
}

.status-dot--ok {
  background: #2e9a43;
}

.status-dot--bad {
  background: #d08a00;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.action-row form {
  margin: 0;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid #ececec;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.table--compact th,
.table--compact td {
  padding: 8px 10px;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.table__actions form {
  margin: 0;
}

.how-to {
  margin: 0 0 16px;
  padding-left: 22px;
}

.how-to li {
  margin-bottom: 8px;
}

/* Formulare */

.stack {
  display: grid;
  gap: 4px;
}

.narrow {
  max-width: 460px;
}

.field {
  margin: 0 0 18px;
}

.field label,
.field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field__hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.required {
  color: var(--red);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  outline: 3px solid rgba(185, 48, 34, 0.18);
  outline-offset: 0;
}

.input-small {
  max-width: 110px;
}

.input-prefix {
  display: flex;
  align-items: stretch;
}

.input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  background: var(--page);
  border: 1px solid var(--border-strong);
  border-right: 0;
  border-radius: var(--radius-small) 0 0 var(--radius-small);
  font-size: 0.85rem;
  white-space: nowrap;
}

.input-prefix input {
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--red);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.inline-form .field {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.inline-form--tight {
  flex-wrap: nowrap;
  align-items: center;
}

.copy-field input {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
}

.image-field__current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  padding: 12px;
  background: var(--page);
  border-radius: var(--radius-small);
}

.image-field__current img {
  max-width: 220px;
  max-height: 110px;
  width: auto;
  height: auto;
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.file-label {
  font-weight: 400 !important;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: 0.9rem;
}

.block-editor {
  margin: 0 0 20px;
  padding: 18px 20px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.block-editor legend {
  padding: 0 8px;
  color: var(--red);
  font-weight: 700;
}

.block-editor__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: -6px 0 12px;
}

.faq-editor {
  padding: 12px 14px 2px;
  margin-bottom: 12px;
  background: var(--page);
  border-radius: var(--radius-small);
}

.add-block {
  padding: 16px;
  background: var(--page);
  border-radius: var(--radius);
}

.add-block__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor__actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 18px rgba(60, 69, 106, 0.14);
}

.terms {
  margin: 8px 0 18px;
  padding: 16px 18px;
  background: var(--page);
  border-radius: var(--radius-small);
  font-size: 0.9rem;
}

.terms ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.terms li {
  margin-bottom: 6px;
}

/* Sprungmarken nicht unter der festen Kopfzeile verstecken */
body.public [id] {
  scroll-margin-top: 96px;
}

/* „Partner werden“ */

.hero--compact {
  padding-bottom: 24px;
}

.hero--compact .hero__lead {
  margin-bottom: 24px;
}

.code-badge {
  display: inline-block;
  margin: 18px auto 0;
  padding: 10px 18px;
  color: var(--success);
  background: var(--success-bg);
  border-radius: var(--radius-small);
  font-size: 0.95rem;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.benefit {
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ececec;
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.benefit h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.benefit p {
  margin: 0;
  color: var(--muted);
}

.register__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 32px;
}

.register__steps h2,
.register__form h2 {
  font-size: 1.35rem;
}

.register__form .terms {
  margin-top: 4px;
}

.register__form .terms summary {
  font-weight: 600;
  cursor: pointer;
}

.register__form .checkbox {
  margin: 12px 0 20px;
}

.code-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #ececec;
}

.code-card__qr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 140px;
}

.code-card__qr svg {
  display: block;
  width: 140px;
  height: auto;
}

.code-card__body {
  flex: 1 1 360px;
}

.code-card__body p {
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .register__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .register__form {
    order: -1;
  }
}

/* Zwei-Faktor-Anmeldung */

.switch-form {
  margin: 0 0 12px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--text);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.switch:disabled {
  cursor: not-allowed;
}

.switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.switch[aria-checked="true"] .switch__track {
  background: #2e9a43;
}

.switch[aria-checked="true"] .switch__thumb {
  transform: translateX(22px);
}

.switch:focus-visible .switch__track {
  outline: 3px solid #1d4f7a;
  outline-offset: 2px;
}

.switch__label {
  font-weight: 600;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0 20px;
}

.method h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.method form {
  margin: 0;
}

.passkey-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.passkey-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ececec;
}

.setup-steps {
  margin: 0;
  padding-left: 22px;
}

.setup-steps > li {
  margin-bottom: 20px;
}

.qr-code {
  width: 200px;
  max-width: 100%;
  margin: 12px 0;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.secret-key,
.recovery-codes code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 1px;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 16px;
  background: var(--page);
  border-radius: var(--radius-small);
  list-style: none;
}

.method-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  background: var(--page);
  border-radius: 999px;
}

.method-tabs a {
  flex: 1 1 0;
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.method-tabs a[aria-current="page"] {
  color: var(--red);
  background: var(--white);
  box-shadow: var(--shadow);
}

/* Anmeldeseiten */

body.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: var(--white);
}

.auth-box {
  width: min(100% - 32px, 480px);
  margin: 48px auto 24px;
  padding: 32px clamp(20px, 5vw, 40px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 36px rgba(60, 69, 106, 0.16);
}

.auth-box__brand {
  display: block;
  margin-bottom: 24px;
  text-align: center;
}

.auth-box__brand img {
  width: 170px;
  height: auto;
}

.auth-box h1 {
  font-size: 1.6rem;
  text-align: center;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
}

.auth-footer {
  margin-top: auto;
  display: flex;
  gap: 24px;
  padding-bottom: 32px;
  font-size: 0.85rem;
}

.auth-footer a {
  color: var(--muted);
}

/* Kleine Bildschirme */

@media (max-width: 760px) {
  .landing-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .landing-hero__media {
    max-width: 420px;
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .facts dd {
    margin-bottom: 10px;
  }

  .site-brand__label {
    display: none;
  }

  .site-logo {
    width: 112px;
  }

  .site-header__inner {
    min-height: 64px;
  }

  .panel {
    padding: 18px;
  }

  .input-prefix {
    flex-direction: column;
  }

  .input-prefix span {
    padding: 6px 10px;
    border-right: 1px solid var(--border-strong);
    border-bottom: 0;
    border-radius: var(--radius-small) var(--radius-small) 0 0;
  }

  .input-prefix input {
    border-radius: 0 0 var(--radius-small) var(--radius-small);
  }

  .inline-form--tight {
    flex-wrap: wrap;
  }

  .steps li {
    padding-left: 70px;
  }
}

@media (max-width: 480px) {
  .site-header__link {
    display: none;
  }
}

@media (max-width: 420px) {
  .site-header__link {
    font-size: 0.85rem;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .block--cta {
    padding: 24px 18px;
  }
}

/* Kennzeichnung „Empfehlung“ (ohne Vergütung) statt „Anzeige“ */
.ad-label--recommendation {
  color: #2b6b37;
  border-color: #b9d8be;
  background: #eef7f0;
}

/* Kundenvorteil: Code erst nach Prüfung von Bestellnummer und E-Mail */
.block--benefit {
  padding: 24px;
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.block--benefit h2 {
  font-size: 1.25rem;
}

.benefit-form__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 16px;
}

.benefit-form .button {
  margin: 4px 0 10px;
}

.benefit-code {
  margin-top: 8px;
  padding: 18px 20px;
  background: var(--success-bg);
  border-radius: var(--radius-small);
}

.benefit-code__label {
  margin: 0 0 6px;
  color: var(--success);
  font-weight: 700;
}

.benefit-code__value input {
  width: 100%;
  max-width: 360px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--white);
  border: 2px dashed var(--success);
  border-radius: var(--radius-small);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.benefit-code__preview {
  margin: 0 0 8px;
  color: var(--info);
  font-size: 0.9rem;
}
