/* Clear State, Baukasten. Nur diese Seite. */

html { scroll-padding-top: 104px; }
body.cs-on #start { display: none; }
body.cs-on #bauer { padding-top: 112px; padding-bottom: 120px; }
#bauer { scroll-margin-top: 12px; }

.cs-app { max-width: 40rem; margin-inline: auto; }

.cs-plan {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(40rem, calc(100% - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 0;
  border-radius: 16px;
  background: var(--deep-900);
  color: #F4F3EF;
  border: 1px solid rgba(185, 162, 122, .55);
  box-shadow: var(--sh-md);
}
.cs-plan.is-confirmed { box-shadow: 0 0 0 2px #5CC2AC, var(--sh-md); }
.cs-plan__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: #F4F3EF;
  text-align: left;
  font: 700 1.0625rem/1.2 var(--font-body);
  cursor: pointer;
}
.cs-plan__title { color: #F4F3EF; }
.cs-plan__chev {
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid #F4F3EF;
  border-bottom: 2px solid #F4F3EF;
  transform: rotate(45deg);
  margin-top: -4px;
}
.cs-plan.is-open .cs-plan__chev { transform: rotate(225deg); margin-top: 4px; }
.cs-flash {
  margin: 0 16px 12px;
  color: #F4F3EF;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.cs-plan p,
.cs-plan .cs-row__text,
.cs-plan .cs-aha,
.cs-plan .cs-lock { color: #F4F3EF; }
.cs-rows { list-style: none; margin: 0; padding: 0 16px 8px; }
.cs-plan:not(.is-open) .cs-rows { display: none; }
.cs-row { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.cs-plan .cs-row__name {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #B9A27A;
}
.cs-plan .cs-row.is-on .cs-row__text {
  margin: 4px 0 0;
  color: #F4F3EF;
  font-size: 1.0625rem;
  line-height: 1.45;
}
.cs-plan .cs-row.is-off .cs-row__text {
  margin: 4px 0 0;
  color: #9FB0B8;
  font-size: 1rem;
  line-height: 1.45;
}
.cs-plan .cs-aha { margin: 6px 0 0; color: #5CC2AC; font-size: 1rem; line-height: 1.45; }

.cs-progress {
  margin: 0 0 8px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-ink);
}
.cs-step h2 { margin-bottom: 10px; max-width: 22ch; }
.cs-step > .cs-sub { margin: 0 0 18px; color: var(--muted); }

button.cs-choice {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.cs-choices { display: grid; gap: 10px; margin: 0 0 18px; }
.cs-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.cs-choice[aria-pressed="true"] .choicecard__mark {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.cs-choice[aria-pressed="true"] .choicecard__mark--box {
  box-shadow: none;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.cs-scale-block { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cs-scale-block p { margin: 0 0 10px; }
.cs-scale { display: flex; gap: 8px; }
.cs-scale button {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #D8D2C6;
  background: #fff;
  font: 600 1rem/1 var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.cs-scale button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.cs-scale-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: .8125rem; color: var(--muted); }

.cs-timer {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
}
.cs-nav { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.cs-nav .btn--primary { flex: 1; }
.cs-skip { margin-top: 14px; }

.cs-result h2 { max-width: 16em; }
.cs-use { margin: 18px 0; padding-left: 1.2em; }
.cs-use li { margin: 8px 0; }
.cs-actions { display: grid; gap: 10px; margin-top: 18px; }
.cs-note { margin-top: 16px; color: var(--muted); font-size: .9375rem; }
.cs-hintbox {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-tint);
}
.cs-soft {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.cs-soft p { margin-top: 0; }

.cs-choice { scroll-margin-top: 24px; scroll-margin-bottom: 96px; }

.cs-plan.is-locked .cs-rows {
  filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
}
.cs-lock {
  margin: 4px 0 8px;
  color: var(--brass);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cs-gates { display: grid; gap: 12px; margin-top: 8px; }
.cs-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--ink);
  font: 600 1.0625rem/1.3 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cs-gate:hover { background: var(--accent-tint); }
@media (min-width: 720px) { .cs-gates { grid-template-columns: 1fr 1fr; } }

@media (max-width: 720px) {
  #start .btn--primary { width: 100%; }
  .cs-plan {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    transform: none;
  }
}
@media (min-width: 721px) {
  .cs-plan { bottom: 24px; }
}

@media print {
  .hdr, .ftr, #start, #so-laeuft, #fragen, .cs-nav, .cs-actions, .cs-soft, .skip-link { display: none !important; }
  #bauer { display: block !important; }
  .cs-plan.is-locked .cs-rows { display: none !important; }
  .cs-plan { position: static !important; left: auto; right: auto; bottom: auto; transform: none; width: 100%; max-height: none; box-shadow: none; color: #000; background: #fff; border-color: #000; }
  .cs-plan .cs-row__text, .cs-plan .cs-aha, .cs-plan .cs-row__name, .cs-plan .cs-plan__title { color: #000 !important; }
  .cs-plan .cs-rows { display: block !important; }
}
