/* Visual system from the inline stylesheet on
   https://ludattel.de/10-publications/ — black rules, system-ui,
   uppercase headers, filled buttons, bordered sections. */

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 15px/1.45 system-ui, sans-serif;
  background: #fff;
  color: #111;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

header {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #111;
  padding-bottom: .75rem;
}

header h1 {
  margin: 0 0 .25rem;
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-wrap: balance;
}

header p {
  margin: .35rem 0 0;
  color: #555;
  font-size: .9em;
}

header p:first-of-type {
  margin-top: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5em;
  align-items: center;
}

.toolbar form {
  margin: 0;
}

.display-switch {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.display-switch .btn[aria-pressed="true"] {
  background: #111;
  color: #fff;
}

.entry-section {
  border: 2px solid #111;
  background: #fff;
  margin-bottom: 1rem;
}

.entry-section-header {
  border-bottom: 2px solid #111;
  padding: .65rem .85rem;
}

.entry-section-header h2 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.3;
}

.entry-section-body {
  padding: .85rem;
}

.entry-section-body > :first-child {
  margin-top: 0;
}

.entry-section-body > :last-child {
  margin-bottom: 0;
}

.prompt {
  margin: 0 0 1rem;
  font-weight: 700;
}

.tag {
  display: inline-block;
  margin: 0 0 .75rem;
  font-size: .7em;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid #bbb;
  padding: .05rem .35rem;
  color: #555;
}

.choices {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #111;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
  border: 1px solid #111;
  border-top: 0;
  padding: .85rem 1rem;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.35;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.choice span {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
}

.survey-header {
  margin-bottom: 1rem;
}

.survey-header .survey-kicker {
  margin: 0 0 .35rem;
  color: #555;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.survey-header h1 {
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
}

.already-note {
  display: none;
  margin: 0 0 1rem;
  font-weight: 700;
}

html.already-submitted .already-note {
  display: block;
}

html.already-submitted .progress,
html.already-submitted .survey-form,
html.already-submitted .form-error {
  display: none !important;
}

.progress {
  margin: 0 0 .75rem;
  color: #555;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.survey-form .entry-section-header h2 {
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
}

.survey-form .entry-section-header .tag {
  margin: 0 0 0 .35rem;
  vertical-align: 2px;
}

.choice-ideal span::after {
  content: "Mitte";
  margin-left: auto;
  border: 1px solid currentColor;
  padding: .05rem .35rem;
  font-size: .7em;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.survey-form textarea {
  min-height: 4.5rem;
}

.step-nav {
  display: flex;
  gap: .5rem;
}

.step-nav .btn {
  padding: .9rem 1rem;
  font-size: .85rem;
}

.step-nav .btn-submit {
  width: auto;
  flex: 1;
  margin-top: 0;
}

.step-nav [hidden] {
  display: none;
}

@media (min-width: 640px) {
  .progress {
    display: none;
  }

  .survey-form [data-step] {
    display: block !important;
  }

  .step-nav [data-back],
  .step-nav [data-next] {
    display: none !important;
  }

  .step-nav [data-submit] {
    display: block !important;
  }
}

.choice span::before {
  content: "";
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
}

@media (hover: hover) {
  .choice:hover:not(:has(input:checked)) {
    background: #f4f4f4;
  }
}

.choice:has(input:checked) {
  background: #111;
  color: #fff;
}

.choice:has(input:checked) span::before {
  background: currentColor;
  box-shadow: inset 0 0 0 2px #111;
}

.choice:focus-within,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.field-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
}

input[type="password"],
input[type="url"],
textarea {
  display: block;
  width: 100%;
  border: 1px solid #111;
  padding: .7rem .75rem;
  font: 16px/1.45 system-ui, sans-serif;
  background: #fff;
  color: #111;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: .4rem .8rem;
  border: 2px solid #111;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .72em;
  letter-spacing: .06em;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  margin-top: .25rem;
  padding: .9rem 1rem;
  font-size: .85rem;
  text-align: center;
}

.btn-ghost {
  background: #fff;
  color: #111;
}

.form-error,
.form-notice,
.field-error {
  font-weight: 700;
}

.form-error,
.form-notice {
  margin: 0 0 1rem;
}

.field-error {
  margin: .75rem 0 0;
}

.entry-section.invalid {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pie {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem;
}

.pattern-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pie-svg {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.swatch {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 2px solid #111;
}

.results li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid #bbb;
}

.results li:last-child {
  border-bottom: 0;
}

.angaben {
  margin: 1rem 0 .35rem;
  font-size: .95rem;
  font-weight: 700;
}

.comments {
  margin: 0;
  padding-left: 1.25rem;
}

.comments li {
  margin: .45rem 0;
  white-space: pre-wrap;
}

.login-form,
.survey-create {
  display: grid;
  gap: .75rem;
}

.survey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .85rem;
}

.survey-actions form {
  margin: 0;
}

.entry-section.is-active .entry-section-header {
  background: #111;
  color: #fff;
}

.entry-section.is-active .entry-section-header .tag {
  margin: 0 0 0 .35rem;
  border-color: #fff;
  color: #fff;
  vertical-align: 2px;
}

.survey-list a:not(.btn) {
  color: #111;
}

@media (min-width: 640px) {
  header h1 {
    font-size: 1.75em;
  }
}

@media print {
  .noprint {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .entry-section {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}
