/* ==========================================================================
   Unternehmer Circle Verband - Design-System
   Die Werte stammen unveraendert aus dem MUI-Theme von project3
   (src/theme/theme.ts), damit die Oberflaeche identisch wirkt.
   ========================================================================== */

:root {
  --background: #f7f9fc;
  --surface: #ffffff;
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-soft: rgba(26, 115, 232, 0.1);
  --primary-soft-strong: rgba(26, 115, 232, 0.14);
  --primary-faint: rgba(26, 115, 232, 0.04);
  --text-primary: #1f1f1f;
  --text-secondary: #5f6368;
  --border: #e3e7ed;
  --success: #188038;
  --success-soft: rgba(24, 128, 56, 0.1);
  --warning: #f9ab00;
  --warning-text: #9a6a00;
  --warning-soft: rgba(249, 171, 0, 0.14);
  --error: #d93025;
  --error-soft: rgba(217, 48, 37, 0.1);
  --neutral-soft: #f1f3f6;

  --radius-button: 9px;
  --radius-input: 9px;
  --radius-card: 14px;
  --radius-chip: 7px;

  --sidebar-width: 248px;
  --topbar-height: 60px;

  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Scrollbar wie im Vorbild */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background-color: #cdd3dc;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

/* --------------------------------------------------------------------------
   Typografie
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--text-primary);
}

.h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.h4 {
  font-size: 1rem;
  font-weight: 600;
}

.body1 {
  font-size: 0.9375rem;
}

.body2 {
  font-size: 0.875rem;
}

.caption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

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

.strong {
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Abstaende (8px-System)
   -------------------------------------------------------------------------- */

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-0 { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Layout: App Shell
   -------------------------------------------------------------------------- */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  inset-block: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar__brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.sidebar__brand img {
  width: 186px;
  height: auto;
  display: block;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sidebar__section-title {
  padding: 12px 12px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-button);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.nav-item.is-active {
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.is-active:hover {
  background-color: var(--primary-soft-strong);
}

.nav-item__icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: block;
}

.nav-item__badge {
  margin-left: auto;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-chip);
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-item.is-active .nav-item__badge {
  background-color: var(--primary);
  color: #fff;
}

.shell__main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: inherit;
}

.topbar__user:hover {
  background-color: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar--soft {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.topbar__user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.content {
  flex: 1;
  padding: 24px;
  max-width: 1560px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Layout: oeffentliche Seiten
   -------------------------------------------------------------------------- */

.public {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--background);
}

.public__header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.public__header-inner,
.public__footer-inner,
.public__main-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.public__header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public__header-inner img {
  width: 200px;
  height: auto;
  display: block;
}

.public__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.public__main {
  flex: 1;
  padding: 40px 0;
}

.public__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  padding: 24px 0;

  /* Mattglas: der Kursverlauf schimmert nur noch schwach durch. */
  background-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

/* Ohne backdrop-filter waere der Footer zu durchsichtig - dann deckender. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .public__footer {
    background-color: rgba(255, 255, 255, 0.95);
  }
}

.public__footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Page Header
   -------------------------------------------------------------------------- */

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

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.page-header__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Karten
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.card + .card {
  margin-top: 20px;
}

.card__content {
  padding: 20px;
}

.card__divider {
  height: 1px;
  background-color: var(--border);
  border: 0;
  margin: 20px 0;
}

.stat-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 8px;
}

.stat-card__hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
  display: block;
}

/* --------------------------------------------------------------------------
   Raster
   -------------------------------------------------------------------------- */

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

.col-4 { grid-column: span 4; min-width: 0; }
.col-5 { grid-column: span 5; min-width: 0; }
.col-6 { grid-column: span 6; min-width: 0; }
.col-7 { grid-column: span 7; min-width: 0; }
.col-8 { grid-column: span 8; min-width: 0; }
.col-12 { grid-column: span 12; min-width: 0; }

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

.field-grid__full {
  grid-column: span 2;
}

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  min-height: 40px;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #c8cfd9;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  outline: 1px solid var(--primary);
  outline-offset: -2px;
}

.input:disabled,
.select:disabled {
  background-color: #f6f7f9;
  color: var(--text-secondary);
}

.field--invalid .input,
.field--invalid .select,
.field--invalid .textarea {
  border-color: var(--error);
}

.field__hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.field__error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 6px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox + .checkbox {
  margin-top: 12px;
}

/* Interessen als klickbare Chips */
.chip-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  padding: 6px 12px;
  font-size: 0.8125rem;
  cursor: pointer;
  background-color: var(--surface);
  user-select: none;
}

.chip-choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-choice:has(input:checked) {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.chip-choice:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Honeypot gegen automatische Einsendungen */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Schaltflaechen
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--primary-hover);
}

.btn--outlined {
  border-color: var(--border);
  color: var(--text-primary);
  background-color: var(--surface);
}

.btn--outlined:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.btn--text {
  color: var(--text-secondary);
  padding: 0 12px;
}

.btn--text:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.btn--danger {
  border-color: var(--border);
  color: var(--error);
  background-color: var(--surface);
}

.btn--danger:hover {
  background-color: var(--error-soft);
}

.btn--small {
  min-height: 32px;
  padding: 0 12px;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-row--end {
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Chips und Status
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-chip);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-secondary);
  white-space: nowrap;
}

.chip--neutral {
  color: var(--text-secondary);
  background-color: var(--neutral-soft);
  border-color: var(--border);
}

.chip--info {
  color: var(--primary);
  background-color: var(--primary-soft);
  border-color: rgba(26, 115, 232, 0.24);
}

.chip--success {
  color: var(--success);
  background-color: var(--success-soft);
  border-color: rgba(24, 128, 56, 0.24);
}

.chip--warning {
  color: var(--warning-text);
  background-color: var(--warning-soft);
  border-color: rgba(249, 171, 0, 0.34);
}

.chip--error {
  color: var(--error);
  background-color: var(--error-soft);
  border-color: rgba(217, 48, 37, 0.24);
}

/* --------------------------------------------------------------------------
   Hinweise
   -------------------------------------------------------------------------- */

.alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.875rem;
  border: 1px solid transparent;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert + .alert {
  margin-top: 12px;
}

.alert__body {
  min-width: 0;
}

.alert--success {
  background-color: var(--success-soft);
  border-color: rgba(24, 128, 56, 0.24);
  color: #10692c;
}

.alert--info {
  background-color: var(--primary-soft);
  border-color: rgba(26, 115, 232, 0.24);
  color: #14539f;
}

.alert--warning {
  background-color: var(--warning-soft);
  border-color: rgba(249, 171, 0, 0.34);
  color: var(--warning-text);
}

.alert--error {
  background-color: var(--error-soft);
  border-color: rgba(217, 48, 37, 0.24);
  color: #a52218;
}

.flash-stack {
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Schluessel-Wert-Listen
   -------------------------------------------------------------------------- */

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

.kv--single {
  grid-template-columns: 1fr;
}

.kv__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.kv__value {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 2px;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

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

.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background-color: #fbfcfe;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background-color: var(--primary-faint);
}

.table__right {
  text-align: right;
}

/* --------------------------------------------------------------------------
   Fortschritt
   -------------------------------------------------------------------------- */

.progress {
  height: 6px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
}

.progress__bar--complete {
  background-color: var(--success);
}

/* --------------------------------------------------------------------------
   Leerzustaende
   -------------------------------------------------------------------------- */

.empty-state {
  padding: 40px 24px;
  text-align: center;
}

.empty-state__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Landingpage
   -------------------------------------------------------------------------- */

:root {
  --navy: #0a2540;
  --brand-green: #2bc97a;
}

/* Breiterer Container für Landing- und Auth-Seiten */
.public--wide .public__header-inner,
.public--wide .public__footer-inner,
.public--wide .public__main-inner {
  max-width: 1140px;
}

.public--wide .public__main {
  padding: 0 0 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background-color: rgba(43, 201, 122, 0.14);
  color: #157a48;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-green);
}


/* Kennzahlenband */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 8px 0 40px;
}

.stat {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
}

.stat__value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Abschnitte */
.section {
  padding: 40px 0;
}

.section__head {
  max-width: 62ch;
  margin-bottom: 28px;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.section__lead {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Leistungskarten */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature__media {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
}

.feature__body {
  padding: 20px;
  flex: 1;
}

.feature__kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-green);
}

.feature__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 6px;
}

.feature__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

/* Aleks+ Abschnitt */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.split img {
  width: 100%;
  height: auto;
  display: block;
}

.quote {
  border-left: 3px solid var(--brand-green);
  padding-left: 16px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 16px 0 0;
}

/* Werte */
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.value {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.value__num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Ablauf */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 20px;
  border-top: 3px solid var(--border);
}

.step--done {
  border-top-color: var(--primary);
}

.step__num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-transform: uppercase;
}

/* Abschluss-Band */
.cta-band {
  background-color: var(--navy);
  border-radius: 20px;
  padding: 40px;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 8px;
}

.cta-band h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
  margin: 8px 0 0;
  max-width: 52ch;
}

.btn--onDark {
  background-color: #fff;
  color: var(--navy);
}

.btn--onDark:hover {
  background-color: #eef3fb;
}

.btn--ghostLight {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--ghostLight:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Anmeldung und Registrierung im zweispaltigen Layout
   -------------------------------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0;
}

.auth--reverse .auth__aside {
  order: -1;
}

.auth__aside {
  position: sticky;
  top: 24px;
  background-color: var(--navy);
  border-radius: 20px;
  padding: 32px;
  color: #fff;
}

.auth__aside h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth__aside p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 8px 0 0;
}

.benefit-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.benefit-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

.benefit-list li:first-child {
  border-top: 0;
}

.benefit-list__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--brand-green);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.benefit-list__text {
  min-width: 0;
}

.benefit-list__text strong {
  display: block;
  font-weight: 600;
}

.benefit-list__text span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8125rem;
}

.auth__note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
}

.auth__note a {
  color: #fff;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Klick-Effekt (Ripple)
   -------------------------------------------------------------------------- */

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  /* Erbt die Textfarbe des Elements - dadurch passt der Effekt ueberall */
  background-color: currentColor;
  opacity: 0.22;
  animation: ripple 520ms cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}

/* Auf gefuellten Flaechen ist Weiss der passende Ton */
.btn--primary .ripple,
.nav-item.is-active .ripple {
  background-color: #fff;
  opacity: 0.3;
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripple {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Kopfband der öffentlichen Seiten
   -------------------------------------------------------------------------- */

/* Hintergrundebene der öffentlichen Seiten.
   Sie liegt fixiert hinter dem Inhalt. Beim Scrollen steigen die angedeuteten
   Kurskurven nach oben - jede Ebene unterschiedlich schnell, das ergibt den
   Parallax-Effekt. Alternative Silhouette: ../img/waves.svg.
   Bewusst als eigene Ebene und nicht über background-attachment: fixed,
   weil das auf iOS unzuverlässig ist. */
.public {
  position: relative;
  background-color: transparent;
}

.public::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--background);

  /* Drei Kursebenen, vorderste zuerst - die erste Grafik liegt oben.
     Beim Scrollen schiebt app.js jede Ebene unterschiedlich weit nach oben;
     die vorderste am weitesten. Das ergibt die Staffelung in der Tiefe.

     Jede Grafik ist hoeher als ihre Ruhelage: unter der Kurve sitzt ein
     Schurz, genau so hoch wie der Anstieg. Deshalb sind die Grafiken
     65 / 58 / 53vh hoch, zeigen aber in Ruhe nur 30 / 34 / 38vh Kurve.
     Der Schurz haengt anfangs unter dem Bildrand (100% + Anstieg) und
     kommt beim Steigen nach oben nach - so wird keine Unterkante sichtbar.

     Voll gescrollt steht die Spitze der vordersten Ebene bei 65vh. */
  background-image:
    url('../img/chart-front.svg'),
    url('../img/chart-mid.svg'),
    url('../img/chart-back.svg'),
    radial-gradient(60rem 30rem at 15% -10%, rgba(26, 115, 232, 0.07), transparent 60%),
    radial-gradient(45rem 26rem at 95% 8%, rgba(43, 201, 122, 0.08), transparent 62%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-position:
    center calc(100% + 35vh - var(--rise-front, 0px)),
    center calc(100% + 24vh - var(--rise-mid, 0px)),
    center calc(100% + 15vh - var(--rise-back, 0px)),
    left top,
    right top;
  background-size: 100% 65vh, 100% 58vh, 100% 53vh, auto, auto;
}

/* Wer Bewegung reduziert haben möchte, bekommt die Ebene ohne Fixierung. */
@media (prefers-reduced-motion: reduce) {
  .public::before {
    position: absolute;

    /* Keine Bewegung fuer alle, die sie abgeschaltet haben: stattdessen
       stehen die Ebenen gleich auf ihrem Endstand. app.js ruehrt die
       Variablen in diesem Fall nicht an. */
    --rise-front: 35vh;
    --rise-mid: 24vh;
    --rise-back: 15vh;
  }
}

.page-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--navy);
  /* Vernetzte Welt. Alternative Motive: header-skyline.svg */
  background-image: url('../img/header-network.svg');
  background-size: cover;
  background-position: center center;
  margin-bottom: 28px;
  isolation: isolate;
}

/* Verlauf von links, damit der Text auf jedem Bildausschnitt lesbar bleibt */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(7, 27, 46, 0.94) 0%,
    rgba(7, 27, 46, 0.82) 42%,
    rgba(7, 27, 46, 0.35) 72%,
    rgba(7, 27, 46, 0.12) 100%
  );
  z-index: -1;
}

.page-hero__inner {
  padding: 44px 40px 52px;
  max-width: 40rem;
}

.page-hero--compact .page-hero__inner {
  padding: 32px 40px 36px;
}

.page-hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 14px 0 0;
}

.page-hero--compact .page-hero__title {
  font-size: 1.75rem;
  margin-top: 0;
}

.page-hero__lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 46ch;
}

.badge--onDark {
  background-color: rgba(43, 201, 122, 0.18);
  color: #7fe3ae;
}

@media (max-width: 700px) {
  .page-hero__inner {
    padding: 28px 24px 34px;
  }

  .page-hero__title {
    font-size: 1.75rem;
  }
}

/* --------------------------------------------------------------------------
   Franchise-Bereiche: Balken mit Fly-in
   -------------------------------------------------------------------------- */

.topics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 120ms, box-shadow 120ms, background-color 120ms;

  /* Leichter Markenton, damit sich die Balken von der weissen Karte abheben.
     --accent-rgb liefert das Partial mit, der Wert hier ist nur die
     Rueckfallebene. */
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.05);
  border-color: rgba(var(--accent-rgb, 26, 115, 232), 0.24);
}

.topic:hover {
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.08);
}

.topic.is-selected {
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.12);
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

/* Der Balken selbst ist die Schaltfläche für das Fly-in */
.topic__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* Der Farbwechsel liegt auf .topic, hier genuegt der Zeiger. */
.topic__bar {
  cursor: pointer;
}

.topic__logo {
  width: 116px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.topic__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.topic__text {
  flex: 1;
  min-width: 0;
}

.topic__name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.topic__claim {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.topic__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

.topic__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 16px 14px 148px;
}

/* Schalter statt Kästchen - deutlicher auf dem Balken */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background-color: #d3d9e2;
  position: relative;
  transition: background-color 140ms;
  flex-shrink: 0;
}

.switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 140ms;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.switch input:checked + .switch__track {
  background-color: var(--accent);
}

.switch input:checked + .switch__track .switch__knob {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.switch input:checked ~ .switch__label {
  color: var(--text-primary);
  font-weight: 500;
}

/* Fly-in */
.topic-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 37, 64, 0.45);
  opacity: 0;
  transition: opacity 200ms;
  z-index: 60;
}

.topic-backdrop.is-open {
  opacity: 1;
}

.topic-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  background-color: var(--surface);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: -12px 0 40px rgba(10, 37, 64, 0.16);
}

/* Ohne diese Regel wuerde display:flex das hidden-Attribut ueberstimmen: Die
   Panels laegen dann dauerhaft rechts neben dem Bildausschnitt und ihr nach
   links fallender Schatten liefe als Streifen ueber den Seitenrand. */
.topic-panel[hidden] {
  display: none;
}

.topic-panel.is-open {
  transform: translateX(0);
}

.topic-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topic-panel__logo {
  max-width: 150px;
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.topic-panel__close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topic-panel__close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.topic-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Bild im Fly-in mit Markenschleier - wie der Kachelkopf, nur hoeher. */
.topic-panel__media {
  position: relative;
  display: block;
  height: 168px;
  border-radius: 12px;
  overflow: hidden;
}

.topic-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topic-panel__media-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(var(--accent-rgb, 26, 115, 232), 0.94) 0%,
    rgba(var(--accent-rgb, 26, 115, 232), 0.66) 58%,
    rgba(10, 37, 64, 0.46) 100%
  );
}

.topic-panel__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 20px 0 0;
}

.topic-panel__lead {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 10px 0 0;
}

.topic-panel__list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.topic-panel__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.5;
}

.topic-panel__list li:first-child {
  border-top: 0;
}

.topic-panel__list svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.topic-panel__audience {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background-color: var(--background);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.topic-panel__foot {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  background-color: var(--surface);
}

.topic-panel__foot .btn {
  align-self: flex-start;
  margin-top: 4px;
}

body.has-flyin {
  overflow: hidden;
}

@media (max-width: 700px) {
  .topic__choices {
    padding-left: 16px;
  }

  .topic__logo {
    width: 92px;
    height: 34px;
  }

  .topic-panel {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Rechtstexte
   -------------------------------------------------------------------------- */

/* Etwas breiter als die Formulare, aber mit begrenzter Zeilenlaenge. */
.legal {
  max-width: 860px;
  margin: 0 auto;
}

.prose {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.prose h2,
.prose h3 {
  margin: 24px 0 8px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 12px;
  max-width: 72ch;
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
  max-width: 72ch;
}

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

.prose a {
  word-break: break-word;
}

/* Person im Impressum */
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.legal-links {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legal-links a {
  color: var(--text-secondary);
}

.legal-links a:hover {
  color: var(--text-primary);
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Zentrierte Formulare (Login, Registrierung, Bestaetigung)
   -------------------------------------------------------------------------- */

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

/* Etwas mehr Platz, wo Balken oder zwei Spalten im Formular stehen */
.narrow--wide {
  max-width: 760px;
}

.result-panel {
  text-align: center;
  padding: 40px 24px;
}

.result-panel__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: block;
}

.result-panel p {
  max-width: 520px;
  margin: 8px auto 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .col-4,
  .col-5,
  .col-7,
  .col-8 {
    grid-column: span 12;
  }
}

@media (max-width: 1000px) {
  .hero,
  .split,
  .auth {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero {
    padding: 32px 0;
  }

  .hero__title {
    font-size: 2.125rem;
  }

  .hero__media {
    order: -1;
  }

  .auth__aside {
    position: static;
  }

  .auth--reverse .auth__aside {
    order: 0;
  }

  .features,
  .values,
  .steps,
  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .shell {
    flex-direction: column;
  }

  .shell__main {
    margin-left: 0;
  }

  .sidebar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
  }

  .sidebar__section-title {
    width: 100%;
  }

  .col-6,
  .field-grid {
    grid-column: span 12;
    /* minmax(0, 1fr) statt 1fr: sonst behaelt die Spalte min-width:auto und
       ein breites Feld drueckt sie ueber den Bildrand hinaus. */
    grid-template-columns: minmax(0, 1fr);
  }

  .field-grid__full {
    grid-column: span 1;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }
}

/* --------------------------------------------------------------------------
   Einblenden beim Erscheinen
   -------------------------------------------------------------------------- */

/* Inhalte kommen weich herein statt hart zu stehen - wie die Uebergaenge von
   MUI im Referenzprojekt: kurz, nach oben, mit deren Standard-Easing
   (easeOut, cubic-bezier(0, 0, 0.2, 1)).

   Versteckt wird nur unter .js, und die Markierung setzt ein Skript im
   <head>. Ohne JavaScript greift diese Regel nie, der Inhalt steht also
   auch dann vollstaendig da.

   ACHTUNG: Die Auswahl unten muss mit REVEAL_SELECTOR in app.js
   uebereinstimmen. :not(.card *) haelt verschachtelte Meldungen heraus -
   sonst wuerde eine Meldung in einer Karte zweimal animiert. */
/* Bewegt wird ueber top, nicht ueber transform. Grund: In den Karten stecken
   die Fly-in-Panels, und die sind position:fixed. Ein Elternteil mit transform
   wird zu deren Bezugsrahmen - das Panel haengt sich dann an die Karte statt
   ans Fenster. Waehrend der Einblendung waere das genau der Fall.
   position:relative hat diese Wirkung nicht. */
.js .page-hero,
.js .page-header,
.js .card,
.js .alert:not(.card *) {
  position: relative;
  top: 14px;
  opacity: 0;
}

.js .is-revealed {
  top: 0;
  opacity: 1;
  transition:
    opacity 420ms cubic-bezier(0, 0, 0.2, 1),
    top 420ms cubic-bezier(0, 0, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Wer Bewegung reduziert haben moechte, sieht den Inhalt ohne Uebergang. */
@media (prefers-reduced-motion: reduce) {
  .js .page-hero,
  .js .page-header,
  .js .card,
  .js .alert:not(.card *) {
    top: 0;
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Leistungen: Kachelwand
   -------------------------------------------------------------------------- */

/* Die Filterleiste erscheint erst, wenn app.js sie uebernommen hat. Ohne
   JavaScript stuende sie ohne Wirkung da - dann ist ungefiltert richtig. */
.offer-filter {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.offer-filter.is-ready {
  display: flex;
}

.chip--filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 140ms, background-color 140ms, color 140ms;
}

.chip--filter:hover {
  border-color: rgba(26, 115, 232, 0.4);
  color: var(--text-primary);
}

.chip--filter.is-active {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background-color: var(--neutral-soft);
  font-size: 0.6875rem;
  font-weight: 500;
}

.chip--filter.is-active .chip__count {
  background-color: rgba(26, 115, 232, 0.16);
}

/* Die Kachelwand: so viele Spalten wie hineinpassen. Die Franchise-Systeme
   nehmen zwei, damit ihr Foto Wirkung hat und die Wand einen Rhythmus bekommt. */
.offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;

  /* Kein align-items: start - die Kacheln sollen sich in einer Reihe auf
     dieselbe Hoehe ziehen. Der Ausgleich landet im Textteil, weil .offer und
     .offer__face Flex-Spalten sind und der Rumpf flex: 1 traegt. */
}

/* ACHTUNG: Hier darf kein transform stehen.
   Das Fly-in in der Kachel ist position:fixed. Ein transformiertes
   Elternelement wird zum Bezugsrahmen fuer fixierte Nachfahren - das Panel
   haengt sich dann an die Kachel statt ans Fenster, wird von deren
   overflow:hidden beschnitten und springt zurueck, sobald der Zeiger die
   Kachel verlaesst. Genau das flackert. Der Anhebe-Effekt laeuft deshalb
   ueber top, nicht ueber translateY. */
.offer {
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 160ms, box-shadow 160ms, top 160ms;
}

.offer:hover {
  border-color: rgba(var(--accent-rgb, 26, 115, 232), 0.5);
  box-shadow: 0 6px 20px rgba(15, 32, 56, 0.09);
  top: -2px;
}

.offer.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 3px 0 var(--accent);
}

@media (min-width: 900px) {
  .offer--wide {
    grid-column: span 2;
  }
}

/* Die ganze Kachelflaeche ist die Schaltflaeche - deshalb hier alle
   Vorgaben zuruecksetzen, die ein <button> mitbringt. */
.offer__face {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 1;
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.offer__face:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* --- Markenkacheln mit Foto --- */

.offer__photo {
  position: relative;
  display: block;
  height: 132px;
  overflow: hidden;
}

.offer__photo > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Der Farbschleier bindet das Foto an die Markenfarbe und schafft den
   Kontrast fuer das negative Logo darueber. */
.offer__photo-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(var(--accent-rgb, 26, 115, 232), 0.92) 0%,
      rgba(var(--accent-rgb, 26, 115, 232), 0.62) 52%,
      rgba(10, 37, 64, 0.42) 100%
    );
}

.offer__brand-logo {
  position: absolute;
  left: 20px;
  bottom: 18px;
  width: 148px;
  max-width: 55%;
  height: auto;
  display: block;
}

/* --- Kacheln mit Symbol --- */

.offer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 20px 20px 0;
  border-radius: 12px;
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.11);
  color: var(--accent, var(--primary));
}

.offer__icon svg {
  width: 24px;
  height: 24px;
}

/* --- Textteil --- */

/* Breite Kachel ohne eigenes Markenzeichen: Symbol und Name in Weiss auf dem
   Farbband, an derselben Stelle, an der die Marken ihr Logo tragen. */
.offer__brand-mark {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.offer__brand-mark svg {
  width: 26px;
  height: 26px;
  padding: 6px;
  box-sizing: content-box;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.18);
}

.offer__brand-mark span {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.offer__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 20px 20px;
}

.offer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.offer__category {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, var(--text-secondary));
}

.offer__note {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background-color: var(--neutral-soft);
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

.offer__name {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

.offer__claim {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.offer__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent, var(--primary));
}

.offer:hover .offer__more svg {
  transform: translateX(3px);
}

.offer__more svg {
  transition: transform 160ms;
}

/* Erscheint nur, wenn etwas vorgemerkt ist. */
.offer__flag {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background-color: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.offer.is-selected .offer__flag {
  display: inline-flex;
}

.offer__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.04);
}

/* Kopfzeile des Fly-ins fuer Leistungen ohne Markenlogo. */
.topic-panel__mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.topic-panel__mark svg {
  width: 26px;
  height: 26px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 10px;
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.11);
  color: var(--accent, var(--primary));
}

.offer-empty {
  margin: 24px 0 0;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.offer-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

/* --------------------------------------------------------------------------
   Startseite
   -------------------------------------------------------------------------- */

.btn--large {
  min-height: 46px;
  padding: 0 24px;
  font-size: 0.9375rem;
}

/* Der Kopf der Startseite. Gleiches Motiv wie die Seitenköpfe, nur höher und
   mit dem Verlauf von unten statt von links - hier steht der Text mittig. */
.hero {
  position: relative;
  margin: 0 0 48px;
  padding: 62px 40px 56px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--navy);
  background-image: url('../img/header-network.svg');
  background-size: cover;
  background-position: center center;
  text-align: center;
}

/* Der Schleier ist waagrecht abgestuft statt rundum gleich: links deckt er
   fuer den Text, in der Mitte laesst er den Globus durch, rechts steht ohnehin
   die Anmeldekarte davor. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(7, 27, 46, 0.95) 0%,
    rgba(7, 27, 46, 0.88) 32%,
    rgba(7, 27, 46, 0.46) 60%,
    rgba(7, 27, 46, 0.58) 100%
  );
}


/* Zweispaltig: links die Ansprache, rechts die Anmeldung. Der Text steht
   dann linksbuendig - mittig gesetzt wirkt er neben einer Karte unruhig. */
.hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 44px;
  align-items: center;
  text-align: left;
  padding: 76px 44px 68px;
}

.hero__pitch {
  max-width: 560px;
}

.hero__points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.hero__points li {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Haken als Pseudoelement - spart 3x dasselbe SVG im Markup. */
.hero__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(43, 201, 122, 0.22);
  box-shadow: inset 0 0 0 1px rgba(43, 201, 122, 0.55);
}

.hero__points li::after {
  content: '';
  position: absolute;
  left: 5.5px;
  top: 9px;
  width: 7px;
  height: 3.5px;
  border-left: 2px solid var(--brand-green);
  border-bottom: 2px solid var(--brand-green);
  transform: rotate(-45deg);
}

.hero__panel {
  padding: 26px 26px 28px;
  border-radius: 16px;
  background-color: var(--surface);
  box-shadow: 0 18px 48px rgba(4, 18, 33, 0.34);
}

.hero__panel-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
  font-weight: 500;
}

.hero__panel-link {
  margin: 12px 0 0;
  font-size: 0.8125rem;
}

.hero__panel-rule {
  margin: 20px 0 16px;
  border: 0;
  border-top: 1px solid var(--border);
}

.hero__panel-note {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

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

/* Unter 900 px steht die Anmeldung unter der Ansprache statt daneben. */
@media (max-width: 900px) {
  .hero--split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 44px 28px;
  }

  .hero__pitch {
    max-width: none;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  border: 1px solid rgba(43, 201, 122, 0.5);
  background-color: rgba(43, 201, 122, 0.16);
  color: var(--brand-green);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero__title {
  margin: 0;
  color: #fff;
  /* Die Untergrenze ist so gewaehlt, dass die zweite Zeile auch auf einem
     schmalen Telefon (288 px Spalte) noch am Stueck steht - sonst faellt
     das letzte Wort allein in eine dritte Zeile. */
  font-size: clamp(1.5rem, 3.4vw, 2.625rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.hero__lead {
  margin: 18px auto 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.0625rem;
  line-height: 1.6;
}


/* --- Abschnitte --- */

.lp-section {
  margin-bottom: 56px;
}

.lp-head {
  max-width: 640px;
  margin-bottom: 24px;
}

.lp-head .h2 {
  margin: 0;
}

.lp-head p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.lp-head--light p {
  color: rgba(255, 255, 255, 0.78);
}

.lp-head--light .h2 {
  color: #fff;
}

/* --- Verbandsleistungen --- */

.lp-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(194px, 1fr));
  gap: 16px;
}

.lp-benefit {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.lp-benefit__art {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
}

.lp-benefit__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.lp-benefit__short {
  margin: 6px 0 0;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.lp-benefit__text {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* --- Franchise-Systeme --- */

.lp-brands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 16px;
}

.lp-brand {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms, box-shadow 160ms, transform 160ms;
}

.lp-brand:hover {
  border-color: rgba(var(--accent-rgb, 26, 115, 232), 0.55);
  box-shadow: 0 8px 24px rgba(15, 32, 56, 0.1);
  transform: translateY(-3px);
}

.lp-brand__photo {
  position: relative;
  display: block;
  height: 126px;
  overflow: hidden;
}

.lp-brand__photo > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-brand__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(var(--accent-rgb, 26, 115, 232), 0.94) 0%,
    rgba(var(--accent-rgb, 26, 115, 232), 0.66) 58%,
    rgba(10, 37, 64, 0.46) 100%
  );
}

.lp-brand__logo {
  position: absolute;
  left: 18px;
  bottom: 16px;
  width: 142px;
  max-width: 62%;
  height: auto;
}

.lp-brand__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 20px;
}

.lp-brand__claim {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.lp-brand__audience {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* --- Zahlen --- */

.lp-numbers {
  margin-bottom: 48px;
  padding: 40px;
  border-radius: 22px;
  background:
    radial-gradient(70% 120% at 12% 0%, rgba(26, 115, 232, 0.34), transparent 62%),
    linear-gradient(120deg, #0a2540 0%, #123a5e 100%);
}

.lp-numbers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.lp-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.06);
}

.lp-number__value {
  color: var(--brand-green);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.1;
}

.lp-number__label {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
}

.lp-number__hint {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.lp-numbers__note {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* --- Abschluss --- */

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.lp-cta .h2 {
  margin: 0;
}

@media (max-width: 640px) {
  .hero {
    padding: 52px 22px 46px;
  }

  .lp-numbers {
    padding: 28px 22px;
  }

  .lp-cta {
    padding: 24px 22px;
  }
}

/* Auf schmalen Geräten passen Logo und beide Schaltflächen nicht in eine
   Zeile - der Kopf hat die Seite dadurch quer scrollbar gemacht. Erst wird
   alles etwas kleiner, und wenn es dann immer noch nicht reicht, rutscht die
   Navigation in eine zweite Zeile. */
@media (max-width: 560px) {
  .public__header-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .public__header-inner img {
    width: 148px;
  }

  .public__nav {
    gap: 6px;
  }

  .public__nav .btn {
    padding: 0 12px;
    font-size: 0.8125rem;
  }
}

/* --------------------------------------------------------------------------
   Cookie-Hinweis
   -------------------------------------------------------------------------- */

/* Als Leiste am unteren Rand statt als Sperrschicht über der Seite: Der
   Hinweis muss sichtbar sein, darf das Lesen aber nicht verhindern - sonst
   wäre die Zustimmung erzwungen und damit keine. */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background-color: var(--surface);
  box-shadow: 0 16px 44px rgba(10, 37, 64, 0.22);
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms ease;
}

.consent.is-open {
  transform: none;
  opacity: 1;
}

.consent__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.consent__text {
  flex: 1 1 380px;
}

.consent__text p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

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

/* Der Auslöser im Fußbereich sieht aus wie die Links daneben, ist aber eine
   Schaltfläche - er führt nirgendwohin, sondern öffnet den Hinweis erneut. */
.legal-links__button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
}

.legal-links__button:hover {
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .consent {
    transition: none;
  }
}

@media (max-width: 560px) {
  .consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 18px;
  }

  .consent__actions .btn {
    flex: 1 1 auto;
  }
}

/* Der Fussbereich traegt seit dem Cookie-Hinweis drei Eintraege statt zwei.
   Nebeneinander passen sie auf schmalen Geraeten nicht mehr in eine Zeile -
   dann untereinander statt ueber den Rand hinaus. */
@media (max-width: 560px) {
  .public__footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
}

/* Hinweis auf die Fördermitgliedschaft im Registrierungsformular.
   Er steht über der Absenden-Schaltfläche, weil er eine Folge der
   Registrierung beschreibt - danach gelesen wäre zu spät. */
.membership-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(43, 201, 122, 0.35);
  border-radius: var(--radius-card);
  background-color: rgba(43, 201, 122, 0.08);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.membership-note svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: var(--brand-green);
}

/* Hinweis im Fly-in bei Leistungen, die noch nicht freigeschaltet sind.
   Er nimmt die Akzentfarbe der jeweiligen Kachel auf (--accent wird auf
   .offer gesetzt und vererbt sich bis hier herunter), damit er als Status
   dieser Leistung gelesen wird und nicht als Fußnote. */
.coming-soon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(var(--accent-rgb, 26, 115, 232), 0.3);
  border-radius: var(--radius-card);
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.09);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.coming-soon svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: var(--accent, var(--primary));
}

/* Nachgerechnet: Bei hellen Akzenten reicht der Kontrast auf dem eigenen
   9-Prozent-Ton nicht - Challenge-Tische kaeme auf 2,8:1, noetig sind 4,5:1.
   Die Farbe tragen deshalb Symbol, Rahmen und Flaeche, der Text bleibt
   dunkel. */
.coming-soon strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Aufzählung auf der Seite zum Solidaritätsbeitrag. */
.solidarity-list {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.solidarity-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.solidarity-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-green);
}

/* Kachel, die direkt weiterführt statt ein Fly-in zu öffnen.
   Ihre Fläche ist keine Schaltfläche - die beiden Wege stehen unten. */
.offer__face--static {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.offer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 20px;
}

.offer__actions .btn {
  flex: 1 1 auto;
}

/* Bereiche im Unterstützungsformular: zwei Spalten, damit die zehn Punkte
   nicht zu einer langen Liste werden. */
.concern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 20px;
}

/* Rechenaufgabe: ein Ergebnis hat höchstens drei Stellen, das Feld muss
   nicht über die halbe Seite gehen. */
.captcha-input {
  max-width: 140px;
}

/* Auf schmalen Geräten hat die Kopfzeile schon mit Logo und zwei
   Schaltflächen zu kämpfen - der dritte Weg tritt dort zurück und bleibt
   über den Fußbereich erreichbar. */
@media (max-width: 720px) {
  .public__nav-help {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Einsparpotenzial
   -------------------------------------------------------------------------- */

.savings-frame {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Die Tabelle hat fünf Spalten mit Zahlen - auf schmalen Geräten wird sie
   weiter unten zu Zeilen umgebaut, dazwischen darf sie geschoben werden. */
.savings-table-wrap {
  overflow-x: auto;
}

.savings-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.savings-table th {
  padding: 12px;
  background-color: var(--neutral-soft);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: right;
}

.savings-table th:first-child,
.savings-table td:first-child {
  text-align: left;
}

.savings-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  /* Ziffern gleich breit - sonst zappeln die Beträge beim Tippen. */
  font-variant-numeric: tabular-nums;
}

.savings-table td:first-child {
  font-weight: 500;
}

.savings-table .input {
  max-width: 150px;
  text-align: right;
  display: inline-block;
}

.savings-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.savings-rate .input {
  max-width: 90px;
}

.savings-table tfoot td {
  font-weight: 500;
  background-color: var(--neutral-soft);
  border-bottom: 0;
}

.savings-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.savings-result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius-card);
  background-color: var(--neutral-soft);
}

.savings-result--primary {
  background: linear-gradient(120deg, #06384a 0%, #0b6e8c 100%);
}

.savings-result__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.savings-result__value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.savings-result__hint {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.savings-result--primary .savings-result__label,
.savings-result--primary .savings-result__hint {
  color: rgba(255, 255, 255, 0.8);
}

.savings-result--primary .savings-result__value {
  color: #fff;
}

/* Unter 640 px wird die Tabelle zu Blöcken: jede Zeile ein Kostenbereich,
   die Spaltenüberschrift steht dann vor dem Wert. */
@media (max-width: 640px) {
  .savings-table {
    min-width: 0;
  }

  .savings-table thead {
    display: none;
  }

  .savings-table tbody,
  .savings-table tbody tr,
  .savings-table tbody td,
  .savings-table tfoot,
  .savings-table tfoot tr,
  .savings-table tfoot td {
    display: block;
  }

  .savings-table tbody tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .savings-table tbody td,
  .savings-table tfoot td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }

  .savings-table tbody td:first-child {
    font-size: 1rem;
    padding-bottom: 8px;
  }

  .savings-table tbody td:not(:first-child)::before,
  .savings-table tfoot td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-align: left;
  }

  .savings-table tfoot tr {
    padding: 12px;
    background-color: var(--neutral-soft);
    border-radius: var(--radius-card);
  }
}

/* --------------------------------------------------------------------------
   Navigation: aufklappbarer Bereich
   -------------------------------------------------------------------------- */

/* <details> statt JavaScript: Ohne Skript bliebe eine selbstgebaute Klappe zu,
   und der Browser bringt Tastaturbedienung und Vorlesbarkeit schon mit. */
.nav-group summary {
  list-style: none;
  cursor: pointer;
}

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

.nav-item--group {
  width: 100%;
}

.nav-group__chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 160ms ease;
}

.nav-group[open] .nav-group__chevron {
  transform: rotate(180deg);
}

.nav-group__items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px;
}

/* Die Marken darunter tragen ihren Farbpunkt - so ist beim Überfliegen klar,
   welcher Konfigurator gemeint ist. */
.nav-item--sub {
  padding-left: 42px;
  font-size: 0.8125rem;
}

.nav-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--accent, var(--primary));
}

/* Zweite Ebene: die Punkte innerhalb einer Marke. Ohne eigenen Farbpunkt -
   er staende direkt unter dem der Marke und sagte dasselbe zweimal. */
.nav-group--sub .nav-group__items {
  margin: 0 0 4px;
}

.nav-item--leaf {
  padding-left: 62px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.nav-item--leaf.is-active {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   AleksSales: Anfragen
   -------------------------------------------------------------------------- */

.request-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Eine Zeile ist ein Link auf die ganze Flaeche - ein kleines "Oeffnen" am
   Rand waere auf dem Telefon kaum zu treffen. */
.request-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--primary));
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.request-row:hover,
.request-row:focus-visible {
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.05);
  border-color: var(--accent, var(--primary));
}

.request-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
}

.request-row__ref {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.request-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.request-facts {
  display: grid;
  grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
  gap: 6px 20px;
  margin: 12px 0 0;
}

.request-facts dt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.request-facts dd {
  margin: 0;
}

.request-message {
  margin: 8px 0 0;
  padding: 12px 14px;
  background-color: var(--neutral-soft);
  border-radius: 10px;
  border-left: 3px solid var(--accent, var(--primary));
  white-space: pre-wrap;
}

.request-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.request-items th,
.request-items td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.request-items th {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.request-items__num {
  text-align: right;
  white-space: nowrap;
}

/* Schmale Eingabefelder in den Angebotszeilen: Eine Menge braucht keine
   halbe Bildschirmbreite, und nebeneinander bleibt die Zeile lesbar. */
.input--tiny {
  width: 72px;
  text-align: right;
}

.input--small {
  width: 118px;
  text-align: right;
}

.offer-form__qty,
.offer-form__price {
  text-align: right;
  white-space: nowrap;
}

.offer-form__free {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 118px 118px;
  gap: 8px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Akquise (Entwurf)
   -------------------------------------------------------------------------- */

/* Der Hinweis, dass hier nichts angebunden ist. Auffaellig genug, dass ihn
   niemand uebersieht, und ruhig genug, dass er nicht wie ein Fehler aussieht. */
.draft-note {
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background-color: var(--warning-soft);
  border-left: 3px solid var(--warning);
  color: var(--text-primary);
  line-height: 1.6;
}

.draft-list {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.draft-list--warn li::marker {
  color: var(--warning-text);
}

.draft-list--ordered {
  gap: 12px;
}

/* Breite Tabellen duerfen scrollen, statt die Seite zu sprengen: Zehn Spalten
   passen auf keinen Laptop, und Spalten wegzulassen hiesse, Zahlen zu
   verstecken. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll .request-items {
  min-width: 720px;
}

.acq-filters {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--background);
}

.acq-filters__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 160px;
  gap: 12px;
}

.acq-filters__flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 14px;
}

/* Wie bei der gefuehrten Abfrage: In einer Reihe darf der Abstand fuer
   untereinander stehende Kaestchen nicht gelten. */
.acq-filters__flags .checkbox {
  align-items: center;
  margin: 0;
}

.acq-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.acq-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acq-table .chip {
  margin: 0 4px 4px 0;
}

/* Die Gespraechskarte - im fertigen Stand faehrt sie von rechts ein. */
.acq-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--background);
}

.acq-panel__phone {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.25rem;
  font-weight: 500;
}

.acq-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.acq-panel__history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.acq-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.acq-preview {
  padding: 16px 18px;
  border-radius: 12px;
  background-color: var(--neutral-soft);
  border-left: 3px solid var(--primary);
}

.acq-preview__body {
  margin: 12px 0 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

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

/* --------------------------------------------------------------------------
   AleksSales: Beratung
   -------------------------------------------------------------------------- */

/* Zwei Spalten: links wird getippt, rechts steht das Ergebnis. Die rechte
   Spalte bleibt beim Blaettern stehen - sie ist das, was der Kunde ansieht. */
.advise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.advise__preview {
  position: sticky;
  top: 16px;
}

.advise__brand {
  margin-bottom: 14px;
}

.advise__brand img {
  max-height: 40px;
  max-width: 100%;
  width: auto;
}

.advise__lines {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.advise__lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9375rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.advise__empty {
  color: var(--text-secondary);
  border-bottom: 0 !important;
}

.advise__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  font-size: 1.125rem;
}

.advise__total strong {
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}

.advise__send {
  width: 100%;
  margin-top: 4px;
}

/* Der Sofortabschluss steckt zugeklappt: Der Normalfall ist das Schicken, und
   eine Zusage im Namen des Kunden soll niemand aus Versehen treffen. */
.advise__direct {
  margin-top: 16px;
}

.advise__direct summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--primary);
}

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

  .advise__preview {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   AleksSales: Statistik
   -------------------------------------------------------------------------- */

/* Die Kennzahlen oben. Vier Kacheln, die letzte breiter - der Geldbetrag ist
   die laengste Zahl und soll nicht umbrechen. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--primary));
  border-radius: var(--radius-card);
}

.stat--wide {
  grid-column: span 2;
}

.stat__value {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.stat__note {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.stats-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}

.stats-filter {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Balken ohne Diagrammbibliothek: eine Zeile, ein Anteil. */
.statbars {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.statbars__row {
  display: grid;
  grid-template-columns: minmax(70px, 30%) minmax(0, 1fr) minmax(48px, max-content);
  align-items: center;
  gap: 10px;
}

.statbars__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.statbars__track {
  height: 10px;
  border-radius: 5px;
  background-color: var(--neutral-soft);
  overflow: hidden;
}

.statbars__fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background-color: var(--accent, var(--primary));
}

.statbars__value {
  text-align: right;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .stat--wide {
    grid-column: span 1;
  }
}

/* Das Angebot beim Endkunden: schmaler als der Konfigurator, weil hier
   gelesen und nicht gestoebert wird. */
.offer-sheet {
  max-width: 760px;
  margin: 0 auto;
}

.offer-sheet__intro {
  margin: 0 0 20px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.request-items tfoot th,
.request-items tfoot td {
  padding: 12px 10px;
  border-top: 2px solid var(--border);
  border-bottom: 0;
  font-size: 1rem;
}

.offer-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 560px) {
  .offer-form__free {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .offer-decision .btn {
    width: 100%;
  }
}

.territory-block + .territory-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.territory-block__codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Das Anfrageformular schliesst die Produktliste ab, statt neben ihr zu
   stehen: Erst waehlen, dann abschicken. */
.conf-request {
  margin-top: 24px;
  border-top: 3px solid var(--accent, var(--primary));
}

@media (max-width: 560px) {
  .request-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 0;
  }

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

/* --------------------------------------------------------------------------
   Verwaltung
   -------------------------------------------------------------------------- */

.admin-search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-user__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-user__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.permission-block + .permission-block {
  margin-top: 18px;
}

.permission-block__title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.permission-block__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 20px;
}

/* Schrittfolge auf der AleksSales-Vorschau. */
.sales-steps {
  margin: 16px 0 0;
  padding: 0 0 0 20px;
  display: grid;
  gap: 14px;
}

.sales-steps li {
  padding-left: 6px;
}

.sales-steps strong {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}

.sales-steps span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Konfigurator (öffentlich)
   -------------------------------------------------------------------------- */

.conf-hero {
  position: relative;
  padding: 44px 40px 48px;
  margin-bottom: 24px;
  border-radius: 22px;
  color: #fff;
  overflow: hidden;
  /* Das Motiv liegt oben, der Verlauf darunter - so faerbt die Marke das
     Bild, und eine einzige Datei passt zu allen vier Systemen. */
  background:
    url('../img/conf-hero.svg') center right / cover no-repeat,
    radial-gradient(70% 120% at 12% 0%, rgba(255, 255, 255, 0.18), transparent 62%),
    linear-gradient(120deg,
      rgba(var(--accent-rgb, 26, 115, 232), 1) 0%,
      rgba(10, 37, 64, 0.92) 100%);
}

/* Der Text steht ueber dem Motiv, nicht daneben. */
.conf-hero > * {
  position: relative;
  z-index: 1;
}

.conf-hero__logo {
  max-width: 200px;
  max-height: 56px;
  width: auto;
  height: auto;
  display: block;
  margin-bottom: 20px;
  /* Das Kundenlogo kommt von außerhalb und ist selten negativ angelegt -
     der weiße Kasten macht es auf dem Farbverlauf lesbar. */
  background-color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
}

.conf-hero__name {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 12px;
}

.conf-hero__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 500;
  line-height: 1.15;
  /* Ausdruecklich: Die allgemeine Regel fuer h1 setzt eine dunkle Farbe und
     wuerde die Vererbung vom Kopf ueberstimmen. */
  color: #fff;
  text-shadow: 0 1px 2px rgba(10, 37, 64, 0.25);
  /* Breit genug fuer "123 Vorteilswelt konfigurieren" in einer Zeile, eng
     genug, dass eine lange Kundenbezeichnung nicht quer durchs Bild laeuft. */
  max-width: 26ch;
}

.conf-hero__intro {
  margin: 14px 0 0;
  max-width: 54ch;
  line-height: 1.6;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
}

.conf-hero__name {
  color: #fff;
}

/* Gefuehrte Abfrage: vor der Produktliste, deshalb ruhig und breit.
   Die Fragen stehen untereinander - nebeneinander liest sie niemand. */
.conf-quiz {
  margin-bottom: 24px;
  border-top: 3px solid var(--accent, var(--primary));
}

.conf-quiz__step {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
}

.conf-quiz__question {
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Die Antworten stehen nebeneinander. Ohne das Zuruecksetzen des
   Abstands zwischen zwei Kaestchen - der gilt fuer untereinander stehende -
   ruecken sie treppenartig nach unten. */
.conf-quiz__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  margin-top: 10px;
}

.conf-quiz__options .checkbox {
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  font-size: 0.875rem;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.conf-quiz__options .checkbox:hover {
  border-color: var(--accent, var(--primary));
}

/* Gewaehlt: Die Antwort soll man aus zwei Metern Abstand erkennen, nicht nur
   am Haken. :has() koennen alle Browser, die diese Seite sehen; wo nicht,
   bleibt das Kaestchen selbst die Auskunft. */
.conf-quiz__options .checkbox:has(input:checked) {
  border-color: var(--accent, var(--primary));
  background-color: rgba(var(--accent-rgb, 26, 115, 232), 0.08);
}

.conf-quiz__options .checkbox input {
  margin: 0;
}

.conf-quiz__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 24px;
}

/* Kontrolle der erzeugten Fragen im Kundenbereich. */
.conf-review {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 14px;
}

.conf-review__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.conf-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.conf-filter + .conf-filter {
  margin-top: 18px;
}

.conf-filter__title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.conf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.conf-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.conf-card__image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background-color: var(--neutral-soft);
}

.conf-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 18px 18px;
}

.conf-card__category {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, var(--primary));
}

.conf-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.conf-card__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.conf-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.conf-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
}

.conf-card__price {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.conf-card__unit {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

  .conf-hero {
    padding: 26px;
  }
}
