@font-face {
  font-family: Manrope;
  src: url("/static/brand/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/static/brand/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/static/brand/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/static/brand/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

/* Tokens follow the athereon.de stylesheet (grey-700 ink, grey-600 plum, green 50–700, navy). */
:root {
  --ink: #182533;
  --muted: #5c4659;
  --subtle: #747c85;
  --navy: #06081f;
  --night: #0b1630;
  --green-25: #f2faf7;
  --green-50: #dcf3eb;
  --green-200: #73cdad;
  --green: #68bd9f;
  --green-300: #49a483;
  --green-700: #006a61;
  --sky: #f7fbff;
  --sky-100: #cfe0f4;
  --line: #e5e7eb;
  --line-soft: #eef1f4;
  --line-strong: #d3dae1;
  --surface: #ffffff;
  --surface-2: #f6f9fb;
  --error: #b42318;
  --error-ink: #7a271a;
  --error-bg: #fef3f2;
  --error-line: #fecdca;
  --amber: #8a5a00;
  --amber-bg: #fdf3dc;
  --blue: #1f4fbf;
  --blue-bg: #eaf2fd;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(6, 8, 31, 0.05);
  --shadow-sm: 0 1px 3px rgba(6, 8, 31, 0.06), 0 1px 2px rgba(6, 8, 31, 0.03);
  --shadow-md: 0 12px 32px -14px rgba(6, 8, 31, 0.16), 0 2px 6px rgba(6, 8, 31, 0.04);
  --shadow-lg: 0 32px 64px -28px rgba(6, 8, 31, 0.28), 0 10px 24px -12px rgba(6, 8, 31, 0.1);
  --shadow-glow: 0 10px 30px -8px rgba(104, 189, 159, 0.35), 0 1px 3px rgba(6, 8, 31, 0.04);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --check-white: url("/static/ui/check.svg");
  --chevron: url("/static/ui/chevron.svg");
  --alert-red: url("/static/ui/alert.svg");
  --user-green: url("/static/ui/user.svg");
  --lock-green: url("/static/ui/lock.svg");
  color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0, var(--sky) 640px, #f3f8fa 100%);
  color: var(--muted);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* Soft brand glow behind every page, like the athereon.de hero. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
body::before {
  top: -28vmax;
  right: -18vmax;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(closest-side, rgba(115, 205, 173, 0.24), rgba(115, 205, 173, 0) 72%);
}
body::after {
  bottom: -30vmax;
  left: -22vmax;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(closest-side, rgba(207, 224, 244, 0.65), rgba(207, 224, 244, 0) 70%);
}

h1, h2, h3, .product, .story-title, .customer-list strong {
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(34px, 2.4vw + 18px, 48px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.025em; }
h2 { font-size: clamp(22px, 0.9vw + 16px, 28px); line-height: 1.25; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.35; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
strong, b { font-weight: 600; }
a { color: var(--green-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 3px; }

.icon { width: 20px; height: 20px; flex: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header and footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(24, 37, 51, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}
.brand { display: flex; align-items: center; border-radius: 8px; }
.brand img { height: 30px; width: auto; display: block; }
.brand-divider { width: 1px; height: 24px; background: var(--line-strong); }
.product { margin: 0; font-size: 15px; color: var(--ink); font-weight: 700; letter-spacing: 0; }
.product span { color: var(--green); }

.lang-switch {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 3px;
  border-radius: 999px;
  background: rgba(24, 37, 51, 0.06);
}
.lang-switch form { margin: 0; }
.lang-switch button {
  min-width: 40px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-current="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(6, 8, 31, 0.12);
}

.staff-nav { display: flex; gap: 4px; align-items: center; margin-left: auto; font-size: 14px; }
.staff-nav form { margin: 0; }
.staff-nav a,
.staff-nav .linkish {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.staff-nav a:hover, .staff-nav .linkish:hover { background: rgba(24, 37, 51, 0.06); }
.staff-nav a[aria-current="page"] { background: var(--green-50); color: var(--green-700); }
.staff-nav .actor { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--muted); }
.notify { position: relative; flex: none; }
.notify-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.notify-bell:hover,
.notify-bell[aria-expanded="true"] { background: var(--green-50); color: var(--green-700); }
.notify-bell .icon { width: 20px; height: 20px; }
.notify-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font: 700 10px/16px Inter, sans-serif;
  text-align: center;
}
.notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md, 0 16px 40px -20px rgba(6, 8, 31, 0.35));
}
.notify-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.notify-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.notify-panel .notices { max-height: 320px; overflow: auto; margin-top: 10px; }
.notify-panel .hint { margin: 10px 0 4px; }
.notify-panel form { margin: 4px 0 0; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  padding: 36px 16px 44px;
  color: var(--subtle);
  font-size: 13px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(24, 37, 51, 0.05);
  color: var(--ink);
  font-weight: 600;
}
.footer-badge .icon { width: 14px; height: 14px; color: var(--green-700); }
.site-footer a { color: var(--ink); }

/* ---------- Layout ---------- */

main {
  width: min(860px, calc(100% - 32px));
  margin: 40px auto 24px;
  flex: 1;
}
main:has(.auth) { width: min(1120px, calc(100% - 48px)); margin-top: 56px; }
main:has(.hero), main:has(.answers) { width: min(1040px, calc(100% - 48px)); }
main:has(.questionnaire) { width: min(1200px, calc(100% - 48px)); }
main:has(.data) { width: min(1160px, calc(100% - 32px)); }
main:has(.dash) { width: min(1240px, calc(100% - 48px)); }
main:has(.catalog) { width: min(1240px, calc(100% - 32px)); }

main > * { animation: rise 0.6s var(--ease-out) backwards; }
main > :nth-child(2) { animation-delay: 60ms; }
main > :nth-child(3) { animation-delay: 120ms; }
main > :nth-child(4) { animation-delay: 180ms; }
main > :nth-child(5) { animation-delay: 240ms; }
main > :nth-child(n + 6) { animation-delay: 300ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Text ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede { font-size: 18px; line-height: 1.6; margin-bottom: 24px; color: var(--muted); max-width: 62ch; }
.welcome-body { font-size: 16px; line-height: 1.65; margin: -8px 0 0; color: var(--muted); max-width: 68ch; }
.hint, .meta, small { color: var(--muted); font-weight: 400; font-size: 14px; line-height: 1.55; }
.hint { margin: 8px 0 0; }
.meta { margin-bottom: 16px; }
.label { margin: 0 0 4px; color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.45; }
.label-lg { font-family: Manrope, Inter, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.value { color: var(--ink); }
.req { color: var(--green-700); font-weight: 700; }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background-color: var(--green);
  color: var(--navy);
  font: 600 16px/1.2 Inter, sans-serif;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 0 0 1.5px var(--navy),
    0 4px 10px rgba(6, 8, 31, 0.12),
    0 14px 32px -10px rgba(73, 164, 131, 0.6),
    inset 0 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.3s, background 0.3s, color 0.2s;
}
.btn:hover {
  color: var(--navy);
  background-image: linear-gradient(189deg, #86d5b8 0%, #5dbe9d 100%);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1.5px var(--navy),
    0 6px 14px rgba(6, 8, 31, 0.14),
    0 20px 44px -10px rgba(73, 164, 131, 0.7),
    inset 0 1px rgba(255, 255, 255, 0.65);
}
.btn:active {
  color: #fff;
  background-image: linear-gradient(189deg, var(--green-300) 0%, var(--green-700) 100%);
  transform: translateY(0) scale(0.98);
  box-shadow: 0 0 0 1.5px var(--navy), 0 1px 2px rgba(6, 8, 31, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }

.btn.secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-xs);
}
.btn.secondary:hover {
  background: #fff;
  color: var(--green-700);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1.5px var(--green-300), 0 8px 18px -8px rgba(73, 164, 131, 0.45);
}
.btn.secondary:active { background: var(--green-25); color: var(--green-700); transform: scale(0.98); }
.btn.secondary .icon { color: var(--green-700); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; transform: none; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(24, 37, 51, 0.06); color: var(--ink); transform: none; box-shadow: none; }
.btn.ghost:active { background: rgba(24, 37, 51, 0.1); color: var(--ink); }
.btn.ghost .icon { color: var(--green-700); }

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-lg);
}
.confirm-dialog::backdrop { background: rgba(6, 8, 31, 0.46); }
.confirm-card { margin: 0; padding: 28px 28px 24px; }
.confirm-card h2 { margin: 0 0 8px; font-size: 22px; }
.confirm-card p { margin: 0; }
.confirm-card .actions { margin: 22px 0 0; justify-content: flex-end; }

.btn.danger { background: #fff; color: var(--error); box-shadow: inset 0 0 0 1.5px #f3b5ae; }
.btn.danger:hover { background: var(--error-bg); color: var(--error); transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px var(--error); }
.btn.danger .icon { color: var(--error); }

.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn.sm .icon { width: 16px; height: 16px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }

button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green-700);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.linkish:hover { color: var(--ink); text-decoration: underline; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0; }
.actions form { margin: 0; }
.actions.separated { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Form controls ---------- */

.field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 4px;
  row-gap: 8px;
  margin-top: 22px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.field > * { grid-column: 1 / -1; }
.field:has(> [aria-required="true"])::after {
  content: "*";
  grid-row: 1;
  grid-column: 2;
  color: var(--green-700);
  font-weight: 700;
}
.field-short { max-width: 280px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"],
input[type="number"], input[type="search"], input[type="url"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background-color: #fff;
  color: var(--ink);
  font: 400 16px/1.45 Inter, sans-serif;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input:hover, textarea:hover, select:hover { border-color: #bcc6cf; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(104, 189, 159, 0.25);
}
input::placeholder, textarea::placeholder { color: #98a1ab; }
input:disabled, textarea:disabled, select:disabled { background-color: var(--surface-2); color: var(--subtle); }
textarea { min-height: 112px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input.invalid, textarea.invalid, select.invalid,
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.password-row { position: relative; display: block; }
.password-row input { padding-right: 104px; }
.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  font: 600 13px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.reveal:hover { background: var(--green-50); color: var(--green-700); }

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--error);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.field-error::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: var(--alert-red) center / contain no-repeat;
}

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.question { margin-top: 28px; }
.question > legend { float: left; width: 100%; }
.question > legend + * { clear: both; }
.question:has(> .choices[aria-required="true"]) > legend::after,
.question:has(> .choice-cards[aria-required="true"]) > legend::after {
  content: "\00a0*";
  color: var(--green-700);
  font-weight: 700;
}

/* Pill choices: the native input covers the label so clicks and focus land on it. */
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.choices label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 20px 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-spring);
}
.choices label::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #b7c1cb;
  border-radius: 50%;
  background: #fff center / 12px no-repeat;
  transition: background-color 0.2s, border-color 0.2s, transform 0.3s var(--ease-spring);
}
.choices label:has(input[type="checkbox"])::before { border-radius: 6px; }
.choices label:hover { border-color: var(--green-200); transform: translateY(-1px); }
.choices input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choices label:has(input:checked) {
  border-color: var(--green-300);
  background: var(--green-25);
  box-shadow: 0 0 0 3px rgba(104, 189, 159, 0.2);
}
.choices label:has(input:checked)::before {
  border-color: var(--green-300);
  background-color: var(--green-300);
  background-image: var(--check-white);
  animation: pop 0.35s var(--ease-spring);
}
.choices label:has(input:focus-visible) { outline: 2px solid var(--green-700); outline-offset: 3px; }
.choices label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
/* A module that comes with another one (SQ in SRM): checked and fixed, not greyed out. */
.choices label.is-included:has(input:disabled) { opacity: 0.8; cursor: default; }
.choices.is-invalid label:not(:has(input:checked)) { border-color: #f3b5ae; }

.choice-cards { display: grid; gap: 10px; margin-top: 14px; }
.choice-cards label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  margin: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}
.choice-cards input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-700);
}
.choice-cards strong { display: block; color: var(--ink); font-family: Manrope, sans-serif; font-size: 15px; }
.choice-cards label > span > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
}
.choice-cards label:hover { border-color: var(--green-200); }
.choice-cards label:has(input:checked) { border-color: var(--green-300); background: var(--green-25); }
.choice-cards label:has(input:focus-visible) { outline: 2px solid var(--green-700); outline-offset: 3px; }

@keyframes pop {
  0% { transform: scale(0.6); }
  100% { transform: scale(1); }
}

/* Checkbox tiles for catalogues and add-ons. */
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.check {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.check:hover { border-color: var(--green-200); }
.check small { display: block; margin-top: 2px; font-size: 12.5px; }
.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid #b7c1cb;
  border-radius: 6px;
  background: #fff center / 12px no-repeat;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.check input[type="checkbox"]:checked {
  border-color: var(--green-300);
  background-color: var(--green-300);
  background-image: var(--check-white);
  animation: pop 0.35s var(--ease-spring);
}
.check:has(input:checked) {
  border-color: var(--green-300);
  background: var(--green-25);
  box-shadow: 0 0 0 3px rgba(104, 189, 159, 0.16);
}
.check:has(input:focus-visible) { outline: 2px solid var(--green-700); outline-offset: 2px; }
.check:has(input:disabled:not(:checked)) { opacity: 0.45; cursor: not-allowed; }
.check:has(input:disabled:not(:checked)) input { cursor: not-allowed; }
.check:has(input[data-locked]) { background: var(--surface-2); border-color: var(--line); box-shadow: none; cursor: default; }
.check:has(input[data-locked]) input { background-color: var(--green-700); border-color: var(--green-700); }
.check.quiet {
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 8px 4px 8px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 14px;
}
.check.quiet:hover { border: 0; color: var(--ink); }
.check.quiet:has(input:checked) {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
.locked-note { display: flex !important; align-items: center; gap: 6px; color: var(--green-700); }
.locked-note::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background: var(--lock-green) center / contain no-repeat;
}

/* ---------- Surfaces ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}
.card + .card, .card + form, form + .card { margin-top: 20px; }
.dash-main > .card, .dash-side > .card, .dash-main > form.card, .dash-side > form.card { margin-top: 0; }
.card > :first-child, .card > .field:first-of-type { margin-top: 0; }
.stack { display: grid; gap: 4px; }

.callout {
  position: relative;
  border: 1px solid rgba(73, 164, 131, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(115, 205, 173, 0.22), rgba(115, 205, 173, 0) 60%),
    #fff;
  box-shadow: var(--shadow-glow);
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--green-25);
  border: 1px solid var(--green-50);
  color: var(--ink);
  font-size: 15px;
}
.banner > .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--green-700); }
.banner.error { background: var(--error-bg); color: var(--error-ink); border-color: var(--error-line); }
.banner.error > .icon { color: var(--error); }
.banner strong { display: block; color: inherit; }

.banner.toast {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  right: 24px;
  z-index: 60;
  align-items: center;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 12px 12px 14px;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.55s var(--ease-spring) both;
}
.banner.toast > .icon {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 6px;
  border-radius: 50%;
  background: var(--green-300);
  color: #fff;
}
.banner.toast span { flex: 1; font-weight: 600; }
.toast-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}
.toast-close:hover { background: var(--surface-2); color: var(--ink); }
.toast-close .icon { width: 16px; height: 16px; }
.banner.toast.is-leaving { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

.error-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; padding: 0; list-style: none; }
.error-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--error-line);
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.error-links a:hover { border-color: var(--error); transform: translateY(-1px); }
.error-links b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 11.5px;
}

.badge-icon,
.feature-icon {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--green-700);
  background: linear-gradient(135deg, var(--green-50) 0%, #eaf4fb 100%);
  box-shadow: inset 0 0 0 1px rgba(73, 164, 131, 0.2);
}
.badge-icon { width: 56px; height: 56px; margin-bottom: 24px; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(73, 164, 131, 0.2), var(--shadow-sm); }
.badge-icon .icon { width: 26px; height: 26px; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; }
.feature-icon .icon { width: 22px; height: 22px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #3b4a59;
  font: 600 13px/1 Inter, sans-serif;
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.new { background: var(--blue-bg); color: var(--blue); }
.status.draft { background: var(--amber-bg); color: var(--amber); }
.status.submitted { background: var(--green-50); color: var(--green-700); }
.status.failed { background: var(--error-bg); color: var(--error); }

/* ---------- Login ---------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 580px;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(24, 37, 51, 0.08);
  box-shadow: var(--shadow-lg);
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  overflow: hidden;
  color: rgba(232, 241, 239, 0.75);
  background:
    radial-gradient(80% 60% at 95% 0%, rgba(115, 205, 173, 0.42), rgba(115, 205, 173, 0) 62%),
    radial-gradient(70% 55% at 0% 100%, rgba(45, 98, 255, 0.24), rgba(45, 98, 255, 0) 62%),
    radial-gradient(45% 40% at 100% 100%, rgba(221, 35, 187, 0.16), rgba(221, 35, 187, 0) 70%),
    linear-gradient(160deg, var(--night) 0%, var(--navy) 100%);
}
.auth-story::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 360px;
  height: 360px;
  background: url("/static/brand/mark.svg") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.auth-story .eyebrow { color: var(--green-200); }
.story-title {
  margin: 0 0 36px;
  max-width: 15ch;
  color: #fff;
  font-size: clamp(28px, 1.6vw + 16px, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px clamp(28px, 4vw, 64px);
}
.auth-card h1 { font-size: clamp(34px, 1.8vw + 20px, 44px); }
.auth-card .lede { font-size: 16px; margin-bottom: 8px; }
.auth-card .field { margin-top: 20px; }
.auth-card .btn-block { margin-top: 20px; min-height: 52px; }

/* Staff login: same split card, the story names the internal area and the card points customers to their own link. */
.auth-staff { min-height: 540px; }
.auth-story .eyebrow .icon { width: 14px; height: 14px; }
.staff-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 600;
}
.staff-pill .icon { width: 14px; height: 14px; }
.btn-sso .ms-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin-left: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(6, 8, 31, 0.14);
}
.btn-sso .ms-logo .icon { width: 14px; height: 14px; }
.customer-redirect {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.customer-redirect .feature-icon { width: 38px; height: 38px; border-radius: 12px; }
.customer-redirect .feature-icon .icon { width: 18px; height: 18px; }
.customer-redirect p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.customer-redirect .customer-redirect-title { margin-bottom: 2px; color: var(--ink); font-size: 15px; font-weight: 600; }
.customer-redirect p[lang="en"] { margin-top: 6px; color: var(--subtle); font-size: 13px; }

/* ---------- Journey ---------- */

.journey { list-style: none; margin: 0; padding: 0; display: grid; }
.journey li { position: relative; display: flex; gap: 16px; padding-bottom: 28px; }
.journey li:last-child { padding-bottom: 0; }
.journey li::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 50px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.journey li:last-child::before { display: none; }
.journey-dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  color: var(--subtle);
  transition: box-shadow 0.3s;
}
.journey-dot .icon { width: 20px; height: 20px; }
.journey .is-done .journey-dot { background: var(--green-300); border-color: var(--green-300); color: #fff; }
.journey .is-done::before { background: var(--green-200); }
.journey .is-current .journey-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(104, 189, 159, 0.22);
}
.journey li > div { padding-top: 2px; }
.journey strong { display: block; color: var(--ink); font-family: Manrope, sans-serif; font-weight: 700; font-size: 16px; }
.journey li > div > span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.auth-story .journey strong { color: #fff; }
.auth-story .journey li > div > span { color: rgba(232, 241, 239, 0.7); }
.auth-story .journey li::before { background: rgba(255, 255, 255, 0.16); }
.auth-story .journey-dot { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.8); }
.auth-story .journey .is-current .journey-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
  box-shadow: 0 0 0 6px rgba(104, 189, 159, 0.2), 0 0 32px rgba(104, 189, 159, 0.5);
}

/* ---------- Welcome and privacy ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 32px;
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(115, 205, 173, 0.3) 0%, rgba(115, 205, 173, 0) 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(207, 224, 244, 0.7) 0%, rgba(207, 224, 244, 0) 60%),
    linear-gradient(180deg, #fff 0%, var(--sky) 100%);
  border: 1px solid rgba(24, 37, 51, 0.07);
  box-shadow: var(--shadow-md);
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 340px;
  height: 340px;
  background: url("/static/brand/mark.svg") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; font-size: clamp(36px, 3.2vw + 16px, 56px); overflow-wrap: anywhere; }
.hero-greet, .hero-name { display: block; }
.hero-name { overflow-wrap: break-word; }
.hero .actions { margin: 32px 0 0; }
.hero .title-row { align-items: flex-start; gap: 16px; }
.hero.is-done {
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(73, 164, 131, 0.28) 0%, rgba(73, 164, 131, 0) 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(207, 224, 244, 0.55) 0%, rgba(207, 224, 244, 0) 60%),
    linear-gradient(180deg, #fff 0%, #eef8f4 100%);
}
.hero-compact { padding: clamp(28px, 4vw, 48px); }
.hero-compact h1 { font-size: clamp(32px, 2vw + 18px, 44px); }
.hero-compact .lede { margin-bottom: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.feature p { margin: 2px 0 0; color: var(--ink); font-size: 15px; line-height: 1.5; }

.journey-card {
  margin-top: 20px;
  padding: 32px clamp(24px, 4vw, 40px) 36px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.journey-card h2 { font-size: 20px; margin-bottom: 24px; }
.journey-card .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.journey-card .journey li { flex-direction: column; gap: 14px; padding: 0; }
.journey-card .journey li::before { left: 56px; right: -12px; top: 21px; bottom: auto; width: auto; height: 2px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.info-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8dee4; }
.info-card .feature-icon { margin-bottom: 18px; }
.info-card h2 { font-size: 19px; margin-bottom: 8px; }
.info-card p { margin: 0; font-size: 15px; line-height: 1.6; }

.cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 18px 18px 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, rgba(220, 243, 235, 0.85) 0%, rgba(247, 251, 255, 0.95) 70%);
  border: 1px solid rgba(73, 164, 131, 0.2);
}
.cta-bar form { margin: 0; }

/* ---------- Questionnaire ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 28px;
}
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: 4px;
}
.dash-head h1 { margin: 0; }
.dash-head .meta { margin: 10px 0 0; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-actions form { margin: 0; }
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.dash-main, .dash-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.dash .card h2 { margin-bottom: 8px; font-size: 22px; }
.dash .card .actions { margin: 16px 0 0; }
.dash fieldset.stack { margin-top: 4px; }
.dash-answers { margin-top: 36px; }
.dash-answers > h2 { margin-bottom: 16px; }
.dash-side .secret { overflow-wrap: anywhere; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.title-row h1 { margin: 0; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.toolbar form { margin: 0; }

.questionnaire {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
[id^="abschnitt-"] { scroll-margin-top: calc(var(--header-h) + 24px); }

.progress {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 18px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  counter-reset: step;
}
.progress::before {
  content: "";
  position: absolute;
  left: 30px;
  top: var(--track-top, 34px);
  height: var(--track-h, calc(100% - 68px));
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.progress-fill {
  position: absolute;
  left: 30px;
  top: var(--track-top, 34px);
  width: 2px;
  height: var(--fill, 0px);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--green-200), var(--green-300));
  transition: height 0.35s var(--ease-out);
  pointer-events: none;
}
.progress-marker {
  position: absolute;
  pointer-events: none;
  left: 14px;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(104, 189, 159, 0.22);
  transform: translateY(var(--mark, 0px));
  transition: transform 0.35s var(--ease-out);
}
.progress a {
  position: relative;
  z-index: 1;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 6px 0;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  counter-increment: step;
  transition: color 0.2s;
}
.progress a::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff center / 13px no-repeat;
  border: 1.5px solid var(--line-strong);
  color: var(--subtle);
  font: 600 12px/1 Inter, sans-serif;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.progress a:hover { color: var(--ink); }
.progress a.done { color: var(--ink); }
.progress a.active { color: var(--ink); }
.progress a.active::before { background-color: var(--navy); border-color: var(--navy); color: #fff; }
.progress a.is-started { color: var(--ink); }
.progress a.is-started::before {
  background-color: var(--amber-bg);
  border-color: var(--amber);
  color: var(--amber);
}
.progress a.active.is-started::before {
  background-color: var(--amber);
  border-color: var(--amber);
  color: #fff;
}
.progress a.is-complete::before {
  content: "";
  background-color: var(--green-300);
  background-image: var(--check-white);
  border-color: var(--green-300);
}
.progress a.active.is-complete::before { background-color: var(--green-700); border-color: var(--green-700); }
.progress a.has-error::before { background-color: var(--error-bg); border-color: var(--error); color: var(--error); }
.progress a.has-error.active::before { background-color: var(--error); color: #fff; }

.form-legend { margin: 0 0 12px; text-align: right; color: var(--muted); font-size: 13px; }

.questionnaire-main form, .answers { counter-reset: section; }
.questionnaire-main section.block,
.answers section.block,
form[data-preview] section.block {
  counter-increment: section;
  position: relative;
  margin: 0 0 20px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.questionnaire-main section.block.is-active {
  border-color: rgba(104, 189, 159, 0.55);
  box-shadow: var(--shadow-glow);
}
.questionnaire-main section.block > .eyebrow::before,
.answers section.block > .eyebrow::before,
form[data-preview] section.block > .eyebrow::before {
  content: counter(section, decimal-leading-zero);
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.questionnaire-main section.block > h2,
.answers section.block > h2 { margin-bottom: 4px; }
.questionnaire-main section.block > p:not(.eyebrow):not(.hint):not(.field-error),
.answers section.block > p:not(.eyebrow) { max-width: 70ch; }
section.block h3 { margin-top: 32px; }

.block { margin-top: 48px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

.person {
  margin-top: 20px;
  padding: 22px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.person h3, section.block .person > h3, .person-head h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; }
.person h3::before, .person-head h3::before {
  content: "";
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff var(--user-green) center / 18px no-repeat;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-xs);
}
.person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.person-head h3 { flex: 1; min-width: 0; }
.person-head [data-remove-contact] { flex: none; color: var(--muted); }
.person-head [data-remove-contact]:hover { color: var(--error); }
.person-head [data-copy-from-lead] { flex: none; white-space: nowrap; }
.person .hint { margin-top: 10px; }
.person .grid .field { margin-top: 18px; }
[data-extra-contacts] .person { animation: rise 0.45s var(--ease-out) backwards; }
[data-add-contact] { margin-top: 16px; }

.branch {
  margin-top: 18px;
  padding: 2px 0 6px 20px;
  border-left: 2px solid var(--green-200);
  animation: rise 0.4s var(--ease-out) backwards;
}
.branch > .field:first-child, .branch > .question:first-child { margin-top: 4px; }

.preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
}
.url .icon { width: 14px; height: 14px; color: var(--green-700); }
.url strong { font-weight: 600; overflow-wrap: anywhere; }

.quota {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 600;
}
.quota-dots { display: inline-flex; gap: 4px; }
.quota-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(0, 106, 97, 0.2); transition: background 0.25s, transform 0.3s var(--ease-spring); }
.quota-dots i.on { background: var(--green-700); transform: scale(1.15); }
.quota.is-full { background: var(--amber-bg); color: var(--amber); }
.quota.is-full .quota-dots i.on { background: var(--amber); }

.risk-row { margin-top: 2px; }
.risk-custom { margin-top: 4px; max-width: 560px; }
.risk-levels { margin-top: 8px; align-items: start; }

.matrix {
  margin: 28px 0 0;
  padding: 22px 22px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  animation: rise 0.4s var(--ease-out) backwards;
}
.matrix figcaption { margin: 0 0 16px; color: var(--ink); font-weight: 600; font-size: 14px; }
.matrix-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: stretch; }
.axis-y {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  color: var(--subtle);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.axis-x {
  grid-column: 2;
  text-align: center;
  color: var(--subtle);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.matrix-grid { display: grid; grid-template-columns: minmax(64px, max-content) repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; }
.matrix-grid .lbl {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.matrix-grid .lbl.col { justify-content: center; text-align: center; padding-top: 2px; }
.matrix-grid .lbl.empty { color: var(--subtle); font-style: italic; }
.matrix-grid .cell {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  color: rgba(24, 37, 51, 0.55);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(24, 37, 51, 0.04);
  animation: pop 0.4s var(--ease-spring) backwards;
}
.cell.r1 { background: #dcf3eb; }
.cell.r2 { background: #e8f4d4; }
.cell.r3 { background: #fdf0c8; }
.cell.r4 { background: #fbdcc4; }
.cell.r5 { background: #f6c4c1; }

.info {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--green-300);
  background: #fff;
  color: var(--green-700);
  font: 700 14px/1 Manrope, sans-serif;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.2s;
}
.info:hover, .info[aria-expanded="true"] { background: var(--green-50); }
h2 .info { position: relative; top: -2px; }
.info-panel {
  margin: 8px 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--green-25);
  border: 1px solid var(--green-50);
  animation: rise 0.35s var(--ease-out) backwards;
}
.info-panel p:last-child { margin-bottom: 0; }

/* Floating action dock with live progress. */
.dock {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 8px;
  padding: 12px 12px 12px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 37, 51, 0.08);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}
.dock-status { display: flex; flex: 1 1 280px; align-items: center; gap: 14px; min-width: 0; }
.dock-status.can-jump { cursor: pointer; }
.dock-status.can-jump:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.dock-status.can-jump:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; border-radius: 12px; }
.dock-status p { margin: 0; min-width: 0; }
.dock-status strong { display: block; color: var(--ink); font-size: 14.5px; }
.dock-status strong:empty { display: none; }
.dock-hint { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.dock-actions { display: flex; flex: none; flex-wrap: wrap; gap: 10px; }
.dock.is-ready [data-submit] { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 1.5px var(--navy), 0 4px 10px rgba(6, 8, 31, 0.12), 0 14px 32px -10px rgba(73, 164, 131, 0.6), inset 0 1px rgba(255, 255, 255, 0.5); }
  50% { box-shadow: 0 0 0 1.5px var(--navy), 0 0 0 7px rgba(104, 189, 159, 0.25), 0 18px 40px -8px rgba(73, 164, 131, 0.75), inset 0 1px rgba(255, 255, 255, 0.5); }
}

.ring { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-track { stroke: var(--line); }
.ring-value {
  stroke: var(--green-300);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: var(--offset, 100);
  transition: stroke-dashoffset 0.6s var(--ease-out), stroke 0.3s;
}
.dock.is-ready .ring-value { stroke: var(--green-700); }

/* ---------- Read-only answers ---------- */

.success-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 0 0 24px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(115, 205, 173, 0.32) 0%, rgba(115, 205, 173, 0) 60%),
    linear-gradient(180deg, #fff 0%, #f4fbf8 100%);
  border: 1px solid rgba(73, 164, 131, 0.3);
  box-shadow: var(--shadow-glow);
}
.success-card h2 { margin-bottom: 8px; }
.success-card p { max-width: 62ch; }
.success-card .actions { margin: 20px 0 0; }
.success-check { flex: none; width: 72px; height: 72px; }
.success-check circle { fill: var(--green-300); transform-box: fill-box; transform-origin: center; animation: pop 0.6s var(--ease-spring) backwards; }
.success-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.35s var(--ease-out) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.qa { display: grid; margin: 18px 0 0; }
.qa > div {
  display: grid;
  grid-template-columns: minmax(160px, 36%) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.qa > div:first-child { border-top: 0; padding-top: 4px; }
.qa dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.qa dd { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.answers .person .qa { margin-top: 12px; }
.answers .person .qa > div { border-top-color: var(--line); }

.picked { margin: 10px 0 0; padding-left: 20px; color: var(--ink); }
.picked li { margin: 4px 0; }
ul.picked { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
ul.picked li {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-25);
  border: 1px solid var(--green-50);
  color: var(--ink);
  font-size: 14px;
}
ul.picked li.is-off {
  background: transparent;
  color: var(--subtle);
  border-style: dashed;
  border-color: var(--line-strong);
  text-decoration: line-through;
}
.mapping-yours {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
button.mapping-toggle {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-25);
  border: 1px solid var(--green-50);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
button.mapping-toggle.is-off {
  background: transparent;
  color: var(--subtle);
  border-style: dashed;
  border-color: var(--line-strong);
}
button.mapping-toggle.is-off .mapping-name { text-decoration: line-through; }
.mapping-offers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
button.chip-btn {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-25);
  border: 1px solid var(--green-50);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
button.chip-btn .chip-add {
  color: var(--muted);
  font-size: 13px;
}
.mapping-blocked {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  max-width: 42rem;
}
.mapping-blocked .field-error { margin: 4px 0 0; }

/* ---------- Staff pages ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin: 32px 0 16px;
}
.filters label { display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
.filters select { margin: 0; min-width: 180px; }
.date-range { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.date-range[hidden] { display: none; }
.date-range label { min-width: 160px; }
.filter-name { flex: 1 1 280px; max-width: 440px; }
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 12px;
}
.bulk-bar[hidden] { display: none; }
.bulk-bar span { color: var(--muted); font-size: 14px; font-weight: 600; }
.search-field { position: relative; display: block; }
.filters .search-field input { width: 100%; padding-right: 44px; }
.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.search-clear:hover { background: var(--surface-2); color: var(--ink); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.catalog-table { margin-top: 32px; }
.mapping-ends {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}
.mapping-ends .field { margin-top: 0; }
.mapping-generated {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
}
.mapping-label {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}
.catalog-forms {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
table.data th a { color: inherit; text-decoration: none; }
table.data th a:hover { color: var(--ink); }
table.data .col-check { width: 44px; padding-right: 4px; }
table.data .col-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--green-700); }
table.data th.col-actions { width: 1%; text-align: right; }
table.data th a.btn {
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--ink);
}
table.data th a.btn:hover { color: var(--green-700); }
table.data td { color: var(--ink); font-variant-numeric: tabular-nums; }
table.data td:first-child { font-weight: 600; }
table.data tr:last-child td { border-bottom: 0; }
table.data.catalog {
  width: 100%;
  min-width: 840px;
  max-width: none;
}
.catalog-exchange { margin-top: 8px; }
.catalog-exchange h2 { margin: 0 0 6px; font-size: 22px; }
.catalog-exchange > .hint { margin: 0; max-width: 68ch; }
.catalog-exchange-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 48px;
  align-items: flex-end;
  margin-top: 20px;
}
.catalog-exchange .label { margin-bottom: 10px; }
.catalog-exchange .actions,
.catalog-import { margin: 0; }
.catalog-import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 14px 0 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}
.file-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.file-pick-btn {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: 600 14px/1 Inter, sans-serif;
}
.file-pick-name {
  overflow: hidden;
  max-width: 28ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-pick.has-file .file-pick-name { color: var(--ink); font-weight: 600; }
.file-pick:hover { border-color: #bcc6cf; }
.file-pick:focus-within {
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(104, 189, 159, 0.25);
}
.catalog-exchange-cols {
  margin: 18px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  .catalog-exchange-grid { gap: 20px; }
  .file-pick { flex: 1 1 100%; }
}
table.data.catalog td { font-variant-numeric: normal; vertical-align: middle; padding: 10px 12px; }
table.data.catalog td:first-child { font-weight: 400; }
table.data.catalog .col-handle {
  width: 28px;
  padding-left: 8px;
  padding-right: 2px;
}
table.data.catalog .col-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--navy);
}
table.data.catalog .col-group { width: 240px; }
table.data.catalog .col-label { min-width: 180px; }
table.data.catalog .col-note { min-width: 160px; }
table.data.catalog .col-actions { width: 1%; white-space: nowrap; }
table.data.catalog .cell-control {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: none;
}
table.data.catalog .col-group select.cell-control { padding-right: 36px; background-position: right 10px center; }
table.data.catalog tbody tr:hover td { background: var(--green-25); }
table.data.catalog tr.is-inactive td { background: var(--surface-2); }
table.data.catalog tr.is-inactive:hover td { background: #eef4f2; }
table.data.catalog tr.is-dragging td { background: var(--green-50); opacity: 0.72; }
.drag-handle {
  display: block;
  width: 14px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background:
    radial-gradient(circle, var(--subtle) 0.85px, transparent 1px) 2px 2px / 5px 5px repeat,
    transparent;
  cursor: grab;
}
.drag-handle:hover { background-color: var(--green-25); }
.drag-handle:active { cursor: grabbing; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.status-stack { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
table.data.catalog .row-actions { gap: 8px; flex-wrap: nowrap; }
table.data.catalog .row-actions .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
table.data .row-actions { flex-wrap: nowrap; gap: 8px; justify-content: flex-end; }
table.data .row-actions .icon-btn { width: 36px; min-height: 36px; padding: 0; }
table.data .row-actions .icon-btn .icon { width: 18px; height: 18px; }
.icon-tip {
  position: fixed;
  z-index: 80;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: 600 12px/1.3 Inter, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(6, 8, 31, 0.18);
}
.icon-tip[hidden] { display: none; }
tr.customer-row { cursor: pointer; transition: background 0.15s; }
tr.customer-row:hover td { background: var(--green-25); }
tr.customer-row:focus-visible { outline: none; }
tr.customer-row:focus-visible td { background: var(--green-25); box-shadow: inset 0 2px 0 var(--green-300), inset 0 -2px 0 var(--green-300); }
.row-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; min-height: 24px; font-size: 14px; }
.row-actions form { margin: 0; display: flex; align-items: center; }
.row-actions a, .row-actions button { line-height: 1.2; font-weight: 600; }

.notices, .audit { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.notices li, .audit li {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
}
.dash-side .audit.is-capped {
  max-height: calc(5 * (24px + 2px + 2 * 1.55 * 14.5px) + 4 * 8px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--green-300) transparent;
}
.notices li span { color: var(--subtle); font-size: 13px; }
.notices .unread { font-weight: 600; border-left: 3px solid var(--green-300); }
.notices .read { color: var(--muted); }
.notices a { color: var(--ink); font-weight: inherit; }

.secret {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  word-break: break-all;
}

fieldset.stack { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
fieldset.stack > legend { float: left; width: 100%; margin-bottom: 4px; color: var(--ink); font-family: Manrope, sans-serif; font-weight: 700; font-size: 18px; }
fieldset.stack > legend + * { clear: both; }
fieldset.stack > .label { margin-top: 16px; }

.edition-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
details.edition {
  padding: 0;
}
details.edition + details.edition { margin-top: 20px; }
details.edition > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px 16px;
  align-items: start;
  padding: 24px;
  border-radius: inherit;
}
details.edition > summary::-webkit-details-marker { display: none; }
details.edition > summary h2 { margin: 0; }
details.edition > summary p { margin: 0; grid-column: 1; max-width: 72ch; color: var(--muted); }
.edition-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.edition-toggle {
  width: 36px;
  height: 36px;
  justify-self: end;
  border-radius: 10px;
  background: var(--surface-2) var(--chevron) center / 18px no-repeat;
  transition: transform 0.2s var(--ease-out), background-color 0.15s;
}
details.edition[open] > summary .edition-toggle { transform: rotate(180deg); background-color: var(--green-25); }
details.edition > summary:hover .edition-toggle { background-color: var(--green-25); }
.edition-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--line-soft);
}
.edition-body > :first-child { margin-top: 16px; }
.edition-nav a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.edition-nav a:hover { border-color: var(--green-300); color: var(--green-700); }
.diff { margin: 8px 0 16px; padding-left: 20px; color: var(--ink); font-size: 14.5px; }
.diff li { margin: 4px 0; }
section.card h2 { margin-bottom: 4px; }

.customer-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.customer-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.customer-list a:hover { border-color: var(--green-300); }
.customer-list strong { font-size: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .questionnaire { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-card { order: -1; padding: 40px 28px 36px; }
  .auth-story { padding: 36px 28px 40px; }
  .story-title { font-size: 26px; margin-bottom: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .journey-card .journey { grid-template-columns: 1fr; gap: 0; }
  .journey-card .journey li { flex-direction: row; gap: 16px; padding-bottom: 24px; }
  .journey-card .journey li:last-child { padding-bottom: 0; }
  .journey-card .journey li::before { left: 21px; right: auto; top: 50px; bottom: 6px; width: 2px; height: auto; }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  [id^="abschnitt-"] { scroll-margin-top: calc(var(--header-h) + 76px); }
  .questionnaire { grid-template-columns: 1fr; gap: 0; }
  .progress {
    top: var(--header-h);
    z-index: 30;
    flex-direction: row;
    gap: 6px;
    margin: 0 -24px 16px;
    padding: 10px 24px;
    overflow-x: auto;
    border-radius: 0;
    border-width: 0 0 1px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    scrollbar-width: none;
  }
  .progress::-webkit-scrollbar { display: none; }
  .progress::before, .progress-fill, .progress-marker { display: none; }
  .progress a {
    flex: none;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: var(--surface-2);
    white-space: nowrap;
    font-size: 13.5px;
  }
  .progress a::before { width: 22px; height: 22px; font-size: 11px; }
  .progress a.active { background: var(--navy); color: #fff; }
  .progress a.active::before { background-color: #fff; border-color: #fff; color: var(--navy); }
  .progress a.active.is-started::before { background-color: var(--amber-bg); border-color: var(--amber-bg); color: var(--amber); }
  .progress a.active.is-complete::before { background-color: var(--green-300); border-color: var(--green-300); }
  .form-legend { margin-top: 4px; }
}

@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .info-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .mapping-ends { grid-template-columns: 1fr; }
  .qa > div { grid-template-columns: 1fr; gap: 2px; }
  .success-card { flex-direction: column; gap: 16px; }
  .success-check { width: 56px; height: 56px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .header-inner { width: calc(100% - 32px); gap: 12px; }
  .brand img { height: 24px; }
  .brand-divider, .product { display: none; }
  main, main:has(.auth), main:has(.hero), main:has(.answers), main:has(.questionnaire), main:has(.dash) { width: calc(100% - 32px); margin-top: 24px; }
  .progress { margin: 0 -16px 14px; padding: 10px 16px; }
  .hero, .auth { border-radius: 24px; }
  .hero .actions .btn, .cta-bar .btn-lg { width: 100%; }
  .cta-bar { padding: 16px; }
  .cta-bar form, .cta-bar form .btn { width: 100%; }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .toolbar .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .toolbar .btn.sm { width: 40px; padding: 0; }
  .questionnaire-main section.block, .answers section.block { border-radius: 22px; }
  .person { padding: 18px 16px 20px; }
  .field-short { max-width: none; }
  .checks { grid-template-columns: 1fr; }
  .dock {
    bottom: 10px;
    margin-left: -6px;
    margin-right: -6px;
    padding: 10px;
    border-radius: 20px;
  }
  .dock-status { width: 100%; padding: 0 4px; }
  .ring { width: 36px; height: 36px; }
  .dock-hint { display: none; }
  .dock-actions { width: 100%; }
  .dock-actions .btn { flex: 1 1 0; min-height: 46px; padding: 0 14px; font-size: 15px; }
  .banner.toast { left: 16px; right: 16px; max-width: none; }
  .filters select { min-width: 0; width: 100%; }
  .filters label, .date-range, .bulk-bar { flex: 1 1 100%; max-width: none; }
}

/* ---------- Phones and tablets ----------
   Every rule below sits in a query that cannot match a desktop browser
   (wider than 1180px with a mouse), so the desktop layout stays as it is. */

/* Notch and home indicator: the page uses viewport-fit=cover. */
@media (max-width: 1180px), (hover: none) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .site-footer { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  .dock { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* Tablets: the dock fits on one line once the long hint is dropped. */
@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; }
  .dock { padding: 10px 10px 10px 14px; }
  .dock-hint { display: none; }
  .ring { width: 40px; height: 40px; }
}

/* Tablet portrait: keep the desktop arrangement instead of a stretched phone layout. */
@media (min-width: 721px) and (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth-card { order: 0; padding: 44px 32px; }
  .auth-story { padding: 44px 32px; }
  .story-title { font-size: 28px; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { flex-direction: column; gap: 14px; }
  .journey-card .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .journey-card .journey li { flex-direction: column; gap: 14px; padding: 0; }
  .journey-card .journey li::before { left: 56px; right: -10px; top: 21px; bottom: auto; width: auto; height: 2px; }
}

@media (max-width: 860px) {
  .questionnaire-main { min-width: 0; }

  /* Staff navigation gets its own swipeable row instead of running off the screen. */
  .site-header:has(.staff-nav) { position: relative; }
  .header-inner:has(.staff-nav) { padding-top: 10px; row-gap: 8px; }
  .staff-nav {
    order: 3;
    flex: 1 1 100%;
    margin: -4px -24px 0;
    padding: 0 24px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .staff-nav::-webkit-scrollbar { display: none; }
  .staff-nav a, .staff-nav .linkish, .staff-nav .actor { flex: none; white-space: nowrap; }
  .notify-panel { position: fixed; top: 72px; right: 16px; left: 16px; width: auto; }
}

@media (max-width: 720px) {
  /* Three short notes read better as one grouped list than as three cards. */
  .feature-grid {
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
  }
  .feature { padding: 16px 18px; border: 0; border-radius: 0; background: none; box-shadow: none; align-items: center; }
  .feature + .feature { border-top: 1px solid var(--line-soft); }
  .feature-icon { width: 40px; height: 40px; border-radius: 12px; }
  .success-card .actions .btn { width: 100%; }
}

@media (max-width: 640px) {
  body { overflow-x: clip; }
  .staff-nav { margin: -2px -16px 0; padding: 0 16px 10px; }

  /* Title row: the three page tools sit next to the customer name instead of on their own line. */
  .page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "eyebrow tools" "title title";
    align-items: center;
    gap: 6px 12px;
  }
  .page-head > div:first-child { display: contents; }
  .page-head .eyebrow { grid-area: eyebrow; margin: 0; overflow-wrap: anywhere; }
  .page-head .title-row { grid-area: title; }
  .page-head .toolbar { grid-area: tools; }

  /* The questionnaire header scrolls away; the section chips stick to the top. */
  body:has(.questionnaire) .site-header { position: relative; }
  body:has(.questionnaire) .progress { top: 0; }
  body:has(.questionnaire) [id^="abschnitt-"] { scroll-margin-top: 84px; }

  .questionnaire-main section.block, .answers section.block { padding: 22px 20px 24px; }
  .person { padding: 16px 14px 18px; }
  .person h3::before, .person-head h3::before { width: 30px; height: 30px; background-size: 16px; }
  .person h3, .person-head h3 { gap: 10px; text-wrap: balance; }

  /* The copy and remove buttons kept the card header from shrinking and pushed the whole form wider than the phone. */
  .person-head { flex-wrap: wrap; row-gap: 6px; }
  .person-head h3, section.block .person-head h3 { margin-top: 0; }
  .person-head:has([data-copy-from-lead]) h3 { flex-basis: 100%; }
  .person-head [data-copy-from-lead] { margin-left: 26px; white-space: normal; text-align: left; }
  .person-head [data-remove-contact] {
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: -6px -6px -6px 0;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
  }
  .person-head [data-remove-contact] .icon { width: 18px; height: 18px; }

  .risk-levels .field { margin-top: 16px; }

  /* Long level names stay readable: column names run vertically, row names wrap. */
  .matrix { padding: 16px 14px 14px; }
  .matrix-body { gap: 6px 8px; }
  .matrix-grid { grid-template-columns: minmax(0, 6.5em) repeat(var(--n, 4), minmax(0, 1fr)); gap: 4px; }
  .matrix-grid .lbl { font-size: 12px; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
  .matrix-grid .lbl.col {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    justify-content: flex-end;
    align-items: center;
    max-height: 9em;
    padding: 6px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .matrix-grid .cell { min-height: 34px; font-size: 11px; border-radius: 6px; }

  /* The catalogue list is long on a phone, so the quota stays in view under the section chips. */
  .quota {
    position: sticky;
    top: 70px;
    z-index: 5;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), var(--shadow-md);
  }
  .checks { gap: 8px; }
  .check { padding: 12px 14px; }

  .dock {
    flex-wrap: wrap;
    gap: 8px;
    margin-left: -6px;
    margin-right: -6px;
    padding: 8px;
    border-radius: 20px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .dock-status { gap: 10px; padding: 2px 6px 0; }
  .dock-status strong { font-size: 13.5px; }
  .ring { width: 26px; height: 26px; }
  .ring circle { stroke-width: 5; }
  .dock-actions .btn { min-height: 46px; }

  .error-links { gap: 8px; }
}

@media (max-width: 480px) {
  /* German compounds such as "Hauptverantwortlichkeit" break with a hyphen instead of overflowing. */
  h1, h2, h3, legend, .label, .field, .story-title, .journey strong, .choice-cards strong {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
    overflow-wrap: break-word;
  }
}

@media (max-width: 380px) {
  main, main:has(.auth), main:has(.hero), main:has(.answers), main:has(.questionnaire), main:has(.dash) { width: calc(100% - 24px); }
  .progress { margin: 0 -12px 14px; padding: 10px 12px; }
  .questionnaire-main section.block, .answers section.block { padding: 20px 16px 22px; }
  .person { padding: 14px 12px 16px; }
  h1, h2, h3, legend { overflow-wrap: anywhere; }
  .hero h1 { font-size: 32px; }
  .dock-actions .btn { padding: 0 10px; font-size: 14.5px; gap: 6px; }
}

/* Phones in landscape: little height, so only the section chips and the dock stay pinned. */
@media (max-height: 500px) and (max-width: 1000px) {
  .site-header { position: relative; }
  .progress { top: 0; }
  [id^="abschnitt-"] { scroll-margin-top: 80px; }
  .dock { padding-top: 8px; padding-bottom: 8px; }
  .dock-actions .btn { min-height: 44px; }
  .ring { width: 32px; height: 32px; }
  .banner.toast { top: 12px; }
  main, main:has(.questionnaire), main:has(.answers), main:has(.hero), main:has(.auth) { margin-top: 20px; }
  .page-head { align-items: center; margin-bottom: 16px; }
  .title-row h1 { font-size: 32px; }
  .toolbar .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .toolbar .btn.sm { width: 44px; padding: 0; }
}

/* Touch screens: larger targets, press feedback instead of hover, and room for the keyboard. */
@media (hover: none) and (pointer: coarse) {
  a, button, label, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
  .btn, button, .choices label, .choice-cards label, .check, .progress a { touch-action: manipulation; }

  .btn:hover { transform: none; background-image: none; box-shadow: 0 0 0 1.5px var(--navy), 0 4px 10px rgba(6, 8, 31, 0.12), 0 14px 32px -10px rgba(73, 164, 131, 0.6), inset 0 1px rgba(255, 255, 255, 0.5); }
  .btn:hover .icon:last-child:not(:first-child) { transform: none; }
  .btn.secondary:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-xs); }
  .btn.ghost:hover { background: transparent; }
  .btn.danger:hover { background: #fff; transform: none; box-shadow: inset 0 0 0 1.5px #f3b5ae; }
  .btn:active { transform: scale(0.97); color: #fff; background-image: linear-gradient(189deg, var(--green-300) 0%, var(--green-700) 100%); }
  .btn.secondary:active, .btn.ghost:active { background: var(--green-25); color: var(--green-700); }
  .btn.danger:active { background: var(--error-bg); color: var(--error); }
  .choices label:hover { transform: none; border-color: var(--line-strong); }
  .choices label:has(input:checked):hover { border-color: var(--green-300); }
  .choices label:active, .check:active, .choice-cards label:active { transform: scale(0.98); }
  .check:hover, .choice-cards label:hover { border-color: var(--line); }
  .check:has(input:checked):hover, .choice-cards label:has(input:checked):hover { border-color: var(--green-300); }
  .info-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--line); }
  .error-links a:hover { transform: none; }
  input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }

  .lang-switch button { min-width: 46px; min-height: 40px; }
  .toolbar .btn.sm { min-height: 44px; }
  .reveal { padding: 10px 14px; }
  .info { width: 36px; height: 36px; }
  .toast-close { width: 40px; height: 40px; }
  .error-links a { min-height: 36px; padding: 6px 12px 6px 14px; }
  .btn.sm { min-height: 44px; }
  .progress a { min-height: 40px; }
  table.data.catalog .cell-control { font-size: 16px; }

  input[type="date"] { -webkit-appearance: none; appearance: none; display: block; }
  input[type="date"]::-webkit-date-and-time-value { text-align: left; }

  /* While the keyboard is open the dock would cover the field being typed in. */
  .dock { transition: transform 0.25s var(--ease-out), opacity 0.2s; }
  .dock.is-typing { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; }
}

@media (hover: none) and (pointer: coarse) and (max-width: 640px) {
  .toolbar .btn.sm { width: 44px; }
  /* scroll-padding keeps focused fields clear of the chips; it already offsets the section jumps. */
  html:has(.questionnaire) { scroll-padding-top: 76px; scroll-padding-bottom: 24px; }
  body:has(.questionnaire) [id^="abschnitt-"] { scroll-margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .success-check path { stroke-dashoffset: 0; }
}

@media print {
  body { background: #fff; }
  body::before, body::after, .site-header, .site-footer, .toolbar, .dock, .progress, .banner, .actions, .skip-link, .confirm-dialog { display: none !important; }
  main { width: 100%; margin: 0; }
  main > * { animation: none; }
  .questionnaire { display: block; }
  .questionnaire-main section.block, .answers section.block, .success-card {
    box-shadow: none;
    break-inside: avoid;
    border-color: #ccc;
  }
}

/* ---------- Reminders and mail ---------- */
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--subtle); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.mail-detail { display: block; margin-top: 6px; font-size: 13px; color: var(--subtle); }
/* Grid items default to min-width: auto; without this a wide table pushes the card past the viewport instead of scrolling in .table-wrap. */
.reminders-page .dash-main > .card { min-width: 0; }
.reminders-page table.data td a { color: inherit; text-decoration: none; }
.reminders-page table.data td a:hover { color: var(--green-700); text-decoration: underline; }
.dash-side code, .reminders-page code { font-size: 0.92em; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
