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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #f5f5f5;
  line-height: 1.5;
}

a {
  color: #a6192e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrap.is-blurred {
  filter: blur(4px);
  user-select: none;
}

@media (min-width: 768px) {
  .header .pb-md-5 {
    padding-bottom: 2rem !important;
  }
}

/* Language modal */
.lang-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.lang-overlay.is-hidden {
  display: none !important;
  pointer-events: none;
}

.lang-modal,
.lang-modal__buttons,
.lang-btn {
  pointer-events: auto;
}

.lang-modal {
  background: #fff;
  padding: 2.5rem 3rem 2.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  text-align: center;
  max-width: 520px;
  width: calc(100% - 2rem);
}

.lang-modal h2 {
  margin: 0 0 1.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
}

.lang-modal__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.lang-btn {
  flex: 1;
  max-width: 180px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid #a6192e;
  background: #fff;
  color: #a6192e;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  background: #fdf2f4;
}

.lang-btn.is-active,
.lang-btn--primary {
  background: #d80027;
  border-color: #d80027;
  color: #fff;
}

.lang-btn.is-active:hover,
.lang-btn--primary:hover {
  background: #b8001f;
  border-color: #b8001f;
}

/* Main */
.page-content {
  flex: 1;
  padding-bottom: 3rem;
}

.main-inner {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 1.5rem;
}

.page-title {
  margin: 0 0 1.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

.alert-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #fff9e6;
  border-left: 4px solid #e6c200;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

.alert-box__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #0066cc;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.alert-box p {
  margin: 0;
}

/* Form card */
.form-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 0;
}

.form-card__title {
  margin: 0;
  padding: 1.25rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  border-bottom: 1px solid #e8e8e8;
}

.form-card__body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
}

.form-group input::placeholder {
  color: #aaa;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #d80027;
  box-shadow: 0 0 0 2px rgba(216, 0, 39, 0.12);
}

.form-hint {
  font-size: 0.8125rem;
  color: #666;
  margin: 0.35rem 0 0;
}

.form-group input.is-invalid,
.form-group select.is-invalid {
  border-color: #d80027;
  box-shadow: 0 0 0 2px rgba(216, 0, 39, 0.12);
}

.form-error {
  display: none;
  font-size: 0.8125rem;
  color: #d80027;
  margin: 0.35rem 0 0;
}

.form-error.is-visible {
  display: block;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-row .form-group--street {
  flex: 2;
  min-width: 180px;
}

.form-row .form-group--city {
  flex: 1;
  min-width: 120px;
}

.form-row .form-group--zip {
  flex: 0 0 120px;
}

/* Fieldset boxes */
.fieldset-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.fieldset-box legend,
.fieldset-box__legend {
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0 0.35rem;
  margin-bottom: 1rem;
  display: block;
  color: #333;
}

.toggle-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}

.toggle-btn {
  min-width: 72px;
  padding: 0.55rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.toggle-btn:hover {
  border-color: #999;
}

.toggle-btn.is-selected {
  background: #d80027;
  border-color: #d80027;
  color: #fff;
}

.fieldset-box__extra {
  margin-top: 1.25rem;
  display: none;
}

.fieldset-box__extra.is-visible {
  display: block;
}

.fieldset-box__extra .form-row {
  margin-bottom: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eee;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: #d80027;
}

.checkbox-row label {
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e8e8e8;
  background: #fff;
}

.btn-weiter {
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background: #d80027;
  color: #fff;
  transition: background 0.15s;
}

.btn-weiter:hover {
  background: #b8001f;
}

/* Footer — aligned with site.css SwissID footer, explicit contrast */
footer.site-footer {
  background-color: #efefef;
  color: #2b2b2a;
  margin-top: auto;
}

.footer-columns {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h3 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #2b2b2a;
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: #d80027;
  text-decoration: underline;
}

.footer-bar {
  border-top: 1px solid #d8d8d8;
  background: #fff;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #2b2b2a;
}

.footer-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.footer-bar__links a {
  color: #2b2b2a;
  text-decoration: none;
}

.footer-bar__links a:hover {
  color: #d80027;
  text-decoration: underline;
}

.footer-bar__links .divider {
  margin: 0 0.5rem;
  color: #888;
}

footer.site-footer .footer-bar span {
  color: #2b2b2a;
}

/* Success state */
.success-message {
  display: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.success-message.is-visible {
  display: block;
}

.success-message h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.success-message p {
  margin: 0;
  font-size: 1.0625rem;
  color: #444;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

  .form-row .form-group--zip {
    flex: 1;
  }

  .lang-modal {
    padding: 2rem 1.5rem;
  }

  .lang-modal__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .lang-btn {
    max-width: none;
  }
}
