/* =============================================================================
   GmbH-UG.com – Datenblatt-Formular · Stylesheet
   Corporate Identity: Teal #00969B · Dunkel-Teal #0D5054 · Navy #0A2540
   Schriften: Poppins (Headlines) · Lato (Fliesstext)
   ========================================================================== */

:root {
  --teal: #00969b;
  --teal-dark: #0d5054;
  --teal-soft: #e6f4f5;
  --navy: #0a2540;
  --bg: #f6f7fc;
  --white: #ffffff;
  --text: #212529;
  --muted: #5b6472;
  --border: #dee2e6;
  --success: #198754;
  --error: #dc3545;
  --warning: #b26a00;
  --warning-bg: #fff6e6;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06), 0 2px 8px rgba(10, 37, 64, 0.05);
  --shadow: 0 2px 6px rgba(10, 37, 64, 0.07), 0 12px 30px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 18px 50px rgba(10, 37, 64, 0.18);

  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';

  --header-h: 108px;
  --composer-h: 96px;
  --maxw: 780px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1,
h2,
h3,
h4,
.brand__mark text {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.4em;
}

a {
  color: var(--teal-dark);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- Header -- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-bottom: 1px solid var(--border);
}

.app-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}
.brand__mark {
  display: block;
  width: auto;
  height: 36px;
  flex: 0 0 auto;
  align-self: center;
}
.brand__claim {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--navy);
  border-left: 1px solid var(--border);
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 6px;
  box-shadow: var(--shadow-sm);
}
.lang-switch__btn {
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch__btn.is-active {
  background: var(--teal);
  color: #fff;
}
.lang-switch__sep {
  color: var(--border);
}

.progress {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 10px;
}
.progress__bar {
  height: 6px;
  background: #e8ebf3;
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--muted);
}
.progress__section {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ Main -- */
.app-main {
  min-height: calc(100vh - var(--header-h));
}
.view {
  display: none;
}
.view.is-active {
  display: block;
}

/* Chat-Ansicht als App-Shell: eigener Scrollbereich, damit die Eingabekarte
   niemals Inhalte ueberdeckt. */
#view-chat.is-active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}

/* ------------------------------------------------------------------ Chat -- */
.chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 100%;
  padding: 26px max(20px, calc((100% - var(--maxw)) / 2)) 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat > * {
  scroll-margin-bottom: 16px;
  scroll-margin-top: 16px;
}

.bubble {
  max-width: 88%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: rise 0.28s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.bubble--advisor {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}
.bubble--user {
  align-self: flex-end;
  background: var(--teal);
  color: #fff;
  border-bottom-right-radius: 6px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bubble--info {
  background: var(--teal-soft);
  border-color: #c9e6e7;
}
.bubble--section {
  align-self: center;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 8px 0 0;
  text-align: center;
  max-width: 100%;
}
.bubble--section .section-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e6f4f5;
  border-radius: 999px;
  padding: 5px 14px;
}

.bubble__sender {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 4px;
}
.bubble__text {
  white-space: pre-line;
}
.bubble__text p {
  margin: 0 0 0.7em;
}
.bubble__text p:last-child {
  margin-bottom: 0;
}
.bubble__hint {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  background: #f7f9fc;
  border-left: 3px solid var(--teal);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  white-space: pre-line;
}
.bubble--user .bubble__value {
  font-weight: 700;
  white-space: pre-line;
  min-width: 0;
}
.bubble__edit {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bubble__edit:hover {
  background: rgba(255, 255, 255, 0.32);
}

.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 6px;
}
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.4;
  animation: blink 1s infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.16s;
}
.typing span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes blink {
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* -------------------------------------------------------------- Composer -- */
.composer {
  flex: 0 0 auto;
  position: static;
  box-shadow: 0 -12px 20px -14px rgba(10, 37, 64, 0.28);
  background: linear-gradient(180deg, rgba(246, 247, 252, 0) 0%, var(--bg) 22%);
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
}
.composer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.composer__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 10px;
  display: block;
}
.composer__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.composer__row > * {
  flex: 1 1 100%;
  min-width: 0;
}
.composer__row > select,
.composer__row > input[type='date'] {
  max-width: 340px;
}
.composer__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.composer__kbd {
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Inputs -- */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}
.field__label .req {
  color: var(--error);
  margin-left: 2px;
}
.field__hint {
  font-size: 0.8rem;
  color: var(--muted);
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='date'],
textarea,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%230A2540' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 34px;
}
textarea {
  min-height: 104px;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 150, 155, 0.16);
  outline: none;
}
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--error);
}

.error-msg {
  color: var(--error);
  font-size: 0.84rem;
  margin-top: 8px;
}

/* --------------------------------------------------------- Option-Buttons -- */
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.options--inline {
  flex-direction: row;
  flex-wrap: wrap;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.options--inline .option {
  width: auto;
  min-width: 56px;
  justify-content: center;
}
.option:hover {
  border-color: var(--teal);
  background: #f4fbfb;
}
.option:active {
  transform: translateY(1px);
}
.option.is-selected {
  border-color: var(--teal);
  background: var(--teal-soft);
  font-weight: 700;
}
.option__key {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eef1f6;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.option.is-selected .option__key {
  background: var(--teal);
  color: #fff;
}

/* ------------------------------------------------------------- Checkboxes -- */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.check:hover {
  border-color: var(--teal);
}
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--teal);
  flex: 0 0 auto;
}
.check__text {
  font-size: 0.94rem;
}
.check.is-selected {
  border-color: var(--teal);
  background: #f4fbfb;
}

/* ---------------------------------------------------------------- Buttons -- */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 11px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 150, 155, 0.28);
}
.btn--primary:hover {
  background: var(--teal-dark);
}
.btn--primary[disabled] {
  background: #9fc4c6;
  box-shadow: none;
  cursor: not-allowed;
}
.btn--ghost {
  background: var(--white);
  color: var(--teal-dark);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--teal);
}
.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}
.btn--add {
  margin-top: 6px;
}
.btn--danger {
  background: #fff;
  color: var(--error);
  border-color: #f3c6cb;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--teal-dark);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--teal);
  background: #f4fbfb;
}
.icon-btn--danger:hover {
  color: var(--error);
  border-color: #f3c6cb;
  background: #fff5f6;
}

/* ------------------------------------------------------------------ Pages -- */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
.page--center {
  text-align: center;
  max-width: 620px;
  padding-top: 56px;
}
.page__title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.95rem);
}
.page__intro {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 62ch;
}
.page--center .page__intro {
  margin-inline: auto;
}
.page__note {
  font-size: 0.9rem;
  color: var(--muted);
}
.page__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.page__actions--center {
  justify-content: center;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 18px;
}
.card--muted {
  background: #f0f4f8;
  border-style: dashed;
  box-shadow: none;
}
.card__title {
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.card__grid {
  display: grid;
  gap: 18px;
}
.card__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card__grid .field--wide {
  grid-column: 1 / -1;
}
.card__block {
  margin: 26px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.card__block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.card__subtitle {
  font-size: 1rem;
  margin: 0 0 4px;
}
.card__blocktext {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-line;
}
.card__divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}
.notice {
  background: var(--teal-soft);
  border: 1px solid rgba(0, 150, 155, 0.28);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--text);
}
.notice p {
  margin: 4px 0 0;
  white-space: pre-line;
}
.notice--upload {
  background: var(--warning-bg);
  border-color: rgba(178, 106, 0, 0.3);
}
.field__error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.86rem;
  font-weight: 600;
}

/* --------------------------------------------------------------- Matrix -- */
.matrix {
  overflow-x: auto;
}
.matrix__table {
  border-collapse: collapse;
  width: 100%;
  min-width: 340px;
  font-size: 0.92rem;
}
.matrix__table th,
.matrix__table td {
  border: 1px solid var(--border);
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
}
.matrix__table thead th {
  background: var(--teal-soft);
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--navy);
}
.matrix__corner {
  background: transparent !important;
  border-color: transparent !important;
}
.matrix__rowlabel {
  font-weight: 600;
  white-space: nowrap;
  background: #fafbfd;
}
.matrix__table input {
  width: 100%;
  min-width: 90px;
}

/* ------------------------------------------------- Anteils-Zusammenfassung */
.share-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.share-summary__line {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
}
.share-summary__line.is-ok {
  background: #e8f6ee;
  border-color: rgba(25, 135, 84, 0.28);
  color: #14663f;
}
.share-summary__line.is-bad {
  background: #fdecee;
  border-color: rgba(220, 53, 69, 0.3);
  color: #a11221;
}

/* ------------------------------------------------ Bestaetigungs-Dialog --- */
.modal__dialog--sm {
  width: min(460px, 100%);
}
.modal--confirm .modal__body p {
  margin: 0;
}
.btn--danger {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}
.btn--danger:hover {
  background: #bb2d3b;
  border-color: #bb2d3b;
}
.btn--sm {
  padding: 6px 12px;
  font-size: 0.86rem;
  margin-top: 10px;
}

/* ------------------------------------------------------------------ Tiles -- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}
.tile__avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.tile__main {
  flex: 1 1 auto;
  min-width: 0;
}
.tile__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: anywhere;
  margin-bottom: 2px;
}
.tile__role {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.tile__actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.chip--open {
  background: #eef1f6;
  color: var(--muted);
}
.chip--partial {
  background: var(--warning-bg);
  color: var(--warning);
}
.chip--done {
  background: #e7f5ed;
  color: var(--success);
}

/* ----------------------------------------------------------------- Review -- */
.review-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.review-group__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  padding: 14px 20px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
  margin: 0;
  font-size: 0.98rem;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px 20px;
  border-bottom: 1px solid #eef1f6;
}
.review-row:last-child {
  border-bottom: 0;
}
.review-row__label {
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 0;
}
.review-row__value {
  font-weight: 700;
  white-space: pre-line;
  min-width: 0;
}
.review-row__value.is-empty {
  font-weight: 400;
  color: var(--error);
}
details.person-review {
  border-bottom: 1px solid #eef1f6;
}
details.person-review > summary {
  cursor: pointer;
  padding: 13px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
details.person-review > summary::-webkit-details-marker {
  display: none;
}
details.person-review > summary::before {
  content: '▸';
  color: var(--teal);
}
details.person-review[open] > summary::before {
  content: '▾';
}

.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.94rem;
}
.alert--warn {
  background: var(--warning-bg);
  border: 1px solid #f2d9a8;
  color: #7a4a00;
}
.alert--error {
  background: #fdf1f2;
  border: 1px solid #f3c6cb;
  color: #8d222c;
}
.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.card--submit {
  border-color: #cfe6e7;
}
.captcha {
  margin-bottom: 14px;
}
.captcha__row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.captcha__row .field {
  max-width: 180px;
}
.submit-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.reference {
  font-size: 1.05rem;
}
.reference strong {
  font-family: var(--font-display);
  color: var(--teal-dark);
  letter-spacing: 0.02em;
}
.thanks-mark {
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------- Modal -- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] {
  display: none;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.5);
}
.modal__dialog {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(760px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.22s ease both;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--border);
}
.modal__title {
  margin: 0;
  font-size: 1.15rem;
}
.modal__subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.modal__progress {
  padding: 12px 22px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal__progress .progress__bar {
  flex: 1 1 auto;
}
.modal__progress-label {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.modal__body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: #fbfcff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-head {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 2px;
}
.form-head:first-child {
  border-top: 0;
  padding-top: 0;
}
.form-head__sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 4px;
}
.form-info {
  background: var(--teal-soft);
  border: 1px solid #c9e6e7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  white-space: pre-line;
}
.form-notice {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
}
.form-notice strong {
  display: block;
  color: var(--navy);
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.subgrid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.subgrid--full > * {
  grid-column: 1 / -1;
}

/* ----------------------------------------------------------------- Toast -- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 80;
  font-size: 0.9rem;
}
.toast[hidden] {
  display: none;
}

/* ------------------------------------------------------------ Responsive -- */
@media (max-width: 860px) {
  .brand__mark {
    height: 28px;
  }
  .card__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .brand__claim {
    display: none;
  }
  .review-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .review-row__value {
    grid-column: 1 / 2;
  }
  .review-row__edit {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }
  .chat {
    padding: 18px 14px 8px;
    gap: 12px;
  }
  .bubble {
    max-width: 94%;
    padding: 12px 15px;
  }
  .composer {
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  }
  .composer__inner {
    padding: 13px;
  }
  .page {
    padding: 22px 14px 52px;
  }
  .card {
    padding: 16px;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .page__actions .btn {
    flex: 1 1 auto;
  }
  .modal {
    padding: 0;
  }
  .modal__dialog {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .modal__body {
    flex: 1 1 auto;
  }
  .modal__footer {
    border-radius: 0;
  }
  .subgrid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Datenschutzhinweis auf der Startseite (V3) ------------------------- */
.privacy-hint {
  max-width: 760px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.privacy-hint strong {
  color: var(--text);
  margin-right: 0.35rem;
}
.privacy-hint a {
  color: inherit;
  text-decoration: underline;
  white-space: nowrap;
}
.privacy-hint a:hover {
  color: var(--teal-dark);
}

/* Werkzeuge im Kopf des Personendialogs (Sprachumschalter + Schliessen) */
.modal__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.lang-switch--sm {
  padding: 2px 4px;
  box-shadow: none;
}
.lang-switch--sm .lang-switch__btn {
  font-size: 0.72rem;
  padding: 4px 8px;
}
