.sa {
  --sa-creme: #ebe8dd;
  --sa-papier: #f6f4ee;
  --sa-anthrazit: #252525;
  --sa-text: #3a3a3a;
  --sa-gedaempft: #6b675e;
  --sa-linie: #d6d1c3;
  --sa-weiss: #ffffff;
  --sa-fehler: #9b1c1c;
  --sa-radius: 8px;
  box-sizing: border-box;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 16px clamp(48px, 8vw, 96px);
  color: var(--sa-text);
  font-family: Jost, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.sa--eingebettet {
  padding-top: 8px;
  padding-bottom: 24px;
}

.sa--eingebettet .sa-kopf {
  margin-bottom: 20px;
}

.sa--eingebettet .sa-kopf:not(:has(*)) {
  display: none;
}

.sa *,
.sa *::before,
.sa *::after {
  box-sizing: inherit;
}

.sa-kopf {
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.sa-dachzeile {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sa-gedaempft);
}

.sa-titel {
  margin: 0 0 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  color: var(--sa-anthrazit);
}

.sa-einleitung {
  margin: 0 auto;
  max-width: 34em;
  font-size: 19px;
}

.sa-haus {
  display: inline-block;
  margin: 20px 0 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--sa-weiss);
  color: var(--sa-anthrazit);
  font-size: 15px;
}

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

.sa-karte {
  margin: 0;
  border-radius: var(--sa-radius);
  background: var(--sa-papier);
}

.sa-karte-kopf {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  padding: 20px 24px;
}

.sa-schritt {
  grid-column: 1 / -1;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sa-gedaempft);
}

.sa-karte-titel {
  margin: 4px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  color: var(--sa-anthrazit);
}

.sa-zusammenfassung {
  display: none;
  grid-column: 1;
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--sa-gedaempft);
}

.sa-aendern {
  display: none;
  grid-column: 2;
  grid-row: 2 / span 2;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--sa-anthrazit);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sa-karte-inhalt {
  display: none;
  padding: 4px 24px 24px;
}

.sa-karte.ist-offen {
  background: var(--sa-weiss);
  box-shadow: 0 1px 0 var(--sa-linie);
}

.sa-karte.ist-offen .sa-karte-inhalt {
  display: block;
}

.sa-karte.ist-erledigt .sa-zusammenfassung,
.sa-karte.ist-erledigt .sa-aendern {
  display: block;
}

.sa-karte.ist-erledigt .sa-karte-titel {
  font-size: 22px;
}

.sa-karte.ist-gesperrt .sa-karte-titel {
  color: var(--sa-gedaempft);
  font-size: 22px;
}

.sa-gruppe {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.sa-gruppe legend {
  margin-bottom: 10px;
  padding: 0;
  font-weight: 500;
  color: var(--sa-anthrazit);
}

.sa-hinweis-unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

@media (min-width: 720px) {
  .sa-kacheln {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sa-kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--sa-linie);
  border-radius: var(--sa-radius);
  background: var(--sa-weiss);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.sa-kachel input,
.sa-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.sa-kachel-titel {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(18px, 4.8vw, 22px);
  line-height: 1.15;
  color: var(--sa-anthrazit);
  hyphens: manual;
  overflow-wrap: break-word;
}

.sa-kachel-zeile {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--sa-gedaempft);
}

.sa-kachel:hover {
  border-color: var(--sa-anthrazit);
}

.sa-kachel:has(input:checked) {
  border-color: var(--sa-anthrazit);
  background: var(--sa-anthrazit);
}

.sa-kachel:has(input:checked) .sa-kachel-titel,
.sa-kachel:has(input:checked) .sa-kachel-zeile {
  color: var(--sa-creme);
}

.sa-kachel:has(input:focus-visible),
.sa-chip:has(input:focus-visible) {
  outline: 2px solid var(--sa-anthrazit);
  outline-offset: 2px;
}

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

.sa-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--sa-linie);
  border-radius: 999px;
  background: var(--sa-weiss);
  color: var(--sa-anthrazit);
  font-size: 16px;
  cursor: pointer;
}

.sa-chip:hover span {
  border-color: var(--sa-anthrazit);
}

.sa-chip:has(input:checked) span {
  border-color: var(--sa-anthrazit);
  background: var(--sa-anthrazit);
  color: var(--sa-creme);
}

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

@media (min-width: 720px) {
  .sa-haeuser {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sa-haus-kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sa-linie);
  border-radius: var(--sa-radius);
  background: var(--sa-weiss);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sa-haus-kachel input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.sa-haus-bild {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sa-creme);
}

.sa-haus-bild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sa-haus-offen .sa-haus-bild {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-haus-offen .sa-haus-bild span {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 56px;
  line-height: 1;
  color: var(--sa-gedaempft);
}

.sa-haus-name {
  padding: 10px 12px 2px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(17px, 4.4vw, 20px);
  line-height: 1.2;
  color: var(--sa-anthrazit);
  hyphens: manual;
  overflow-wrap: break-word;
}

.sa-haus-zeile {
  padding: 0 12px 12px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--sa-gedaempft);
}

.sa-haus-kachel .sa-haus-name:last-child {
  padding-bottom: 12px;
}

.sa-haus-kachel:hover {
  border-color: var(--sa-anthrazit);
}

.sa-haus-kachel::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 2px solid var(--sa-weiss);
  border-radius: 50%;
  background: rgba(37, 37, 37, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.sa-haus-kachel:has(input:checked) {
  border-color: var(--sa-anthrazit);
  box-shadow: 0 0 0 1px var(--sa-anthrazit);
}

.sa-haus-kachel:has(input:checked)::after {
  border-color: var(--sa-anthrazit);
  background: var(--sa-anthrazit) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.sa-haus-kachel:has(input:focus-visible) {
  outline: 2px solid var(--sa-anthrazit);
  outline-offset: 2px;
}

.sa-zeile {
  display: grid;
  gap: 0 16px;
}

@media (min-width: 640px) {
  .sa-zeile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sa-zeile-drei {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sa-feld {
  margin-bottom: 18px;
}

.sa-feld label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--sa-anthrazit);
}

.sa-optional {
  font-weight: 400;
  font-size: 14px;
  color: var(--sa-gedaempft);
}

.sa input[type="text"],
.sa input[type="email"],
.sa input[type="tel"],
.sa input[type="date"],
.sa input[type="number"],
.sa select,
.sa textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #b9b3a3;
  border-radius: var(--sa-radius);
  background: var(--sa-weiss);
  color: var(--sa-anthrazit);
  font: inherit;
  font-size: 16px;
}

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

.sa select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23252525' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

.sa-karte-titel:focus,
.sa-danke:focus {
  outline: none;
}

.sa input:focus-visible,
.sa select:focus-visible,
.sa textarea:focus-visible {
  outline: 2px solid var(--sa-anthrazit);
  outline-offset: 1px;
}

.sa [aria-invalid="true"] {
  border-color: var(--sa-fehler);
}

.sa-feld-schalter {
  display: flex;
  align-items: flex-end;
}

.sa-schalter {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  font-weight: 400 !important;
  cursor: pointer;
}

.sa-schalter input {
  width: 22px;
  height: 22px;
  accent-color: var(--sa-anthrazit);
}

.sa-zaehler {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
}

.sa-zaehler button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0;
  border: 1px solid #b9b3a3;
  background: var(--sa-papier);
  color: var(--sa-anthrazit);
  line-height: 1;
  cursor: pointer;
}

.sa-zaehler button svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.sa-zaehler button:hover {
  background: var(--sa-creme);
}

.sa-zaehler button:first-child {
  border-radius: var(--sa-radius) 0 0 var(--sa-radius);
}

.sa-zaehler button:last-child {
  border-radius: 0 var(--sa-radius) var(--sa-radius) 0;
}

.sa-zaehler input[type="number"] {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  text-align: center;
  -moz-appearance: textfield;
}

.sa-zaehler input::-webkit-outer-spin-button,
.sa-zaehler input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sa-zuschlag {
  margin: -4px 0 18px;
  padding: 12px 16px;
  border-radius: var(--sa-radius);
  background: var(--sa-creme);
  font-size: 15px;
}

.sa-klein {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--sa-gedaempft);
}

.sa-klein a {
  color: var(--sa-anthrazit);
}

.sa-fehler {
  margin: 0;
  color: var(--sa-fehler);
  font-size: 15px;
}

.sa-fehler:empty {
  display: none;
}

.sa-aktionen {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 8px;
}

.sa-knopf {
  min-height: 50px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--sa-radius);
  background: var(--sa-anthrazit);
  color: var(--sa-weiss);
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}

.sa-knopf:hover {
  background: #000000;
}

.sa-knopf:disabled {
  opacity: 0.6;
  cursor: progress;
}

.sa-knopf:focus-visible,
.sa-zurueck:focus-visible,
.sa-aendern:focus-visible,
.sa-zaehler button:focus-visible {
  outline: 2px solid var(--sa-anthrazit);
  outline-offset: 2px;
}

.sa-zurueck {
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--sa-anthrazit);
  font: inherit;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sa-danke {
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--sa-radius);
  background: var(--sa-weiss);
  text-align: center;
}

.sa-danke:focus {
  outline: none;
}

.sa-uebersicht {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  max-width: 480px;
  margin: 28px auto;
  text-align: left;
}

.sa-uebersicht dt {
  color: var(--sa-gedaempft);
}

.sa-uebersicht dd {
  margin: 0;
  color: var(--sa-anthrazit);
}

.sa.ist-bereit .sa-quelle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sa:not(.ist-bereit) .sa-karten,
.sa:not(.ist-bereit) .sa-danke {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .sa-karte.ist-offen .sa-karte-inhalt {
    animation: sa-auf 0.25s ease-out;
  }

  @keyframes sa-auf {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}
