/* DAT Vermögensmanufaktur as the broker theme, with the values of the DAT app's globals.css. */
.ds-root {
  --background: #ffffff;
  --foreground: #09254b;
  --card: #ffffff;
  --card-foreground: #09254b;
  --muted: #efefef;
  --muted-foreground: #66768e;
  --primary: #09254b;
  --primary-foreground: #ffffff;
  --secondary: #f8f9fa;
  --secondary-foreground: #09254b;
  --accent: #f9b12c;
  --accent-foreground: #09254b;
  --border: #e2e8f0;
  --input: #e2e8f0;
  /* DAT's gold ring reaches only 1.9:1 on white, below the 3:1 WCAG 2.2 asks of a focus indicator. */
  --ring: #09254b;
}

html,
body {
  height: 100%;
  margin: 0;
}

[hidden] {
  display: none !important;
}

.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body > .sr-only {
  position: fixed;
  top: 0;
  left: 0;
}

.ds-root fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ds-root legend {
  padding: 0;
}

.ds-root ul,
.ds-root ol {
  margin: 0;
}

.ds-root
  :is(a[href], button, input, select, textarea, [tabindex]:not([tabindex='-1'])):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.ds-root [tabindex='-1']:focus {
  outline: none;
}

.ds-root .ds-btn:focus-visible,
.ds-root .ds-input:focus-visible,
.ds-root .ds-select:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  box-shadow: none;
}

.stage {
  display: flex;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  background: var(--background);
}

.stage.is-framed {
  background: var(--muted);
}

.device {
  container: device / inline-size;
  position: relative;
  width: 100%;
  max-width: var(--device-width, 1280px);
  height: 100%;
  overflow: hidden;
  background: var(--background);
}

.stage.is-framed .device {
  border-inline: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* The scroller must contain every absolutely positioned descendant, or they widen the device's own overflow and focus can scroll it. */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  scroll-padding-top: calc(var(--header-h, 6.5rem) + 1rem);
  scroll-padding-bottom: 6rem;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brandbar,
.stepbar {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
}

.logo {
  display: block;
  height: 2.5rem;
  width: auto;
}

.coop {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted-foreground);
  text-align: right;
}

.stepbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem 0.375rem;
}

.ds-root .stepbar__back {
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
}

.stepbar__status {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stepbar__label {
  font-weight: var(--weight-semibold);
}

.saved {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1rem;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--success);
}

.saved .ds-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.saved.is-fresh {
  animation: reveal var(--motion-slow) var(--motion-ease-out);
}

.ds-root .stepbar__later {
  padding-inline: 0.5rem;
  font-size: var(--text-xs);
  color: var(--primary);
}

.progress {
  height: 4px;
  background: color-mix(in oklab, var(--primary) 20%, transparent);
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width var(--motion-base) var(--motion-ease);
}

.app-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
}

.main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-width: 0;
}

.step {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

.step-content {
  display: grid;
  flex: 1 0 auto;
  align-content: start;
  gap: 1.5rem;
  width: 100%;
  padding: 1.25rem 1rem 1.75rem;
}

.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--border);
}

.ds-root .actionbar .ds-btn {
  width: 100%;
  min-height: 3rem;
  font-size: var(--text-base);
}

.sidebar {
  display: none;
}

.ds-root .ds-btn {
  height: auto;
  min-height: 2.75rem;
  white-space: normal;
  text-align: center;
}

.ds-root .ds-btn--link {
  justify-self: start;
  padding-inline: 0.25rem;
  font-size: var(--text-sm);
}

.ds-root .ds-btn--icon {
  width: 2.75rem;
}

.when,
.section,
.field-stack,
.disclosure__panel,
.facts__edit {
  display: grid;
  gap: 1.25rem;
}

.reveal {
  animation: reveal var(--motion-base) var(--motion-ease-out);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

.step-title {
  font-size: var(--text-xl);
  line-height: var(--text-xl--line-height);
  font-weight: var(--weight-bold) !important;
  letter-spacing: var(--tracking-tight) !important;
}

.lead {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  color: var(--muted-foreground);
}

.step-content > .lead {
  margin-top: -0.75rem;
}

.muted {
  color: var(--muted-foreground);
}

.section-title {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.welcome-mark,
.done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--primary) 12%, var(--card));
  color: var(--primary);
}

.welcome-mark .ds-icon,
.done-mark .ds-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.done-mark {
  background: var(--success-muted);
  color: var(--success);
}

.box {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.box__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--weight-semibold) !important;
}

.ok-icon {
  color: var(--success);
}

.facts__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem 1rem;
  margin: 0;
}

.facts__list dt {
  margin-top: 0.5rem;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted-foreground);
}

.facts__list dt:first-child {
  margin-top: 0;
}

.facts__list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.facts__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.btn-confirm .ds-icon {
  display: none;
}

.ds-root .btn-confirm[aria-pressed='true'] {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, var(--card));
  box-shadow: inset 0 0 0 1px var(--primary);
  font-weight: var(--weight-semibold);
}

.btn-confirm[aria-pressed='true'] .ds-icon {
  display: block;
  color: var(--primary);
}

.facts__edit {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.ds-root .ds-label {
  line-height: 1.25;
}

.optional {
  font-weight: var(--weight-body);
  color: var(--muted-foreground);
}

.ds-root .ds-input,
.ds-root .ds-select {
  height: auto;
  min-height: 2.75rem;
  font-size: 16px;
  background: var(--card);
}

.ds-root .ds-select {
  text-align: left;
  cursor: pointer;
}

.field--date .ds-input {
  max-width: 11rem;
}

.field--short .affix {
  max-width: 13rem;
}

.field--medium .ds-input {
  max-width: 20rem;
}

.ds-root .ds-input[aria-invalid='true'],
.ds-root .picker.is-invalid .picker__trigger {
  border-color: var(--danger);
  outline: 2px solid var(--destructive);
  outline-offset: 2px;
}

.ds-root .ds-input[aria-invalid='true']:focus-visible,
.ds-root .picker.is-invalid .picker__trigger:focus-visible {
  outline-color: var(--ring);
}

.ds-root .ds-field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0;
  color: var(--danger);
}

.ds-field-error .ds-icon {
  margin-top: 0.125rem;
}

.affix {
  position: relative;
}

.ds-root .affix .ds-input {
  padding-right: 2.25rem;
}

.affix__text {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.pair {
  display: grid;
  gap: 1.25rem;
}

.choice-group {
  display: grid;
  gap: 0.625rem;
}

.choice-legend {
  font-size: var(--text-base);
  line-height: 1.375;
  font-weight: var(--weight-semibold);
}

.group-hint {
  margin-top: -0.375rem;
}

.choices {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choices.cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.choices--seg.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seg {
  position: relative;
  display: block;
}

.seg__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 3rem;
  height: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-align: center;
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease);
}

.seg__face .ds-icon {
  display: none;
  color: var(--primary);
}

.seg:hover .seg__face {
  background: var(--muted);
}

.seg__input:checked + .seg__face {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, var(--card));
  box-shadow: inset 0 0 0 1px var(--primary);
  font-weight: var(--weight-semibold);
}

.seg__input:checked + .seg__face .ds-icon {
  display: block;
}

.seg__input:focus-visible + .seg__face {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease);
}

.tile:hover {
  background: var(--muted);
}

.tile:has(:checked) {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 8%, var(--card));
  box-shadow: inset 0 0 0 1px var(--primary);
}

.tile:has(:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.ds-root .tile input:focus-visible {
  outline: none;
}

.tile__text {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.tile__label,
.seg__face > span {
  overflow-wrap: break-word;
  hyphens: auto;
}

.tile__label {
  min-width: 0;
  font-weight: var(--weight-medium);
}

.tile__label .ds-badge {
  margin-left: 0.25rem;
  vertical-align: 0.0625rem;
}

.tile__desc {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted-foreground);
}

.tile--big {
  flex-wrap: wrap;
  align-items: flex-start;
  min-height: 6.5rem;
  padding: 1rem;
}

.tile--big .tile__icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.tile--big .tile__text {
  flex-basis: 100%;
  order: 2;
}

.ds-root .tile--big .radio-input {
  order: 1;
  margin-left: auto;
}

.ds-root .radio-input,
.ds-root .check-input {
  display: inline-grid;
  flex-shrink: 0;
  place-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1px solid var(--primary);
  background: var(--card);
  appearance: none;
  cursor: pointer;
}

.ds-root .radio-input {
  border-radius: var(--radius-full);
}

.radio-input::before {
  content: '';
  width: 0.625rem;
  height: 0.625rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  transform: scale(0);
  transition: transform var(--motion-fast) var(--motion-ease);
}

.radio-input:checked::before {
  transform: scale(1);
}

.ds-root .check-input {
  border-radius: var(--radius-sm);
}

.check-input::before {
  content: '';
  width: 0.375rem;
  height: 0.6875rem;
  border: solid var(--primary-foreground);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
}

.ds-root .check-input:checked {
  background: var(--primary);
}

.check-input:checked::before {
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.check-field {
  display: grid;
  gap: 0.25rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.625rem 0;
  cursor: pointer;
}

.check .check-input {
  margin-top: 0.0625rem;
}

.check__text {
  display: grid;
  gap: 0.25rem;
}

.check__label {
  font-size: var(--text-base);
  line-height: 1.375;
  font-weight: var(--weight-medium);
}

.check__desc {
  color: var(--muted-foreground);
}

.check-field.is-invalid .check-input {
  border-color: var(--danger);
  outline: 2px solid var(--destructive);
  outline-offset: 2px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.switch-row__label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.ds-root .switch-input {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border-radius: var(--radius-full);
  background: var(--muted-foreground);
  appearance: none;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--motion-ease);
}

.switch-input::before {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--motion-fast) var(--motion-ease);
}

.ds-root .switch-input:checked {
  background: var(--primary);
}

.switch-input:checked::before {
  transform: translateX(1.25rem);
}

.choice-group.is-invalid .seg__face,
.choice-group.is-invalid .tile {
  border-color: var(--danger);
}

.choice-group.is-invalid .choices {
  padding-left: 0.75rem;
  border-left: 3px solid var(--danger);
}

.facts.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.disclosure-wrap {
  display: grid;
  gap: 0.75rem;
}

.disclosure {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  font: inherit;
  font-weight: var(--weight-medium);
  color: var(--primary);
  text-align: left;
  cursor: pointer;
}

.disclosure:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.disclosure__chevron {
  transition: transform var(--motion-fast) var(--motion-ease);
}

.disclosure[aria-expanded='true'] .disclosure__chevron {
  transform: rotate(180deg);
}

.disclosure--help {
  min-height: 2.75rem;
  margin-top: -0.25rem;
  font-size: var(--text-sm);
}

.disclosure__panel {
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid color-mix(in oklab, var(--primary) 40%, transparent);
  background: var(--card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.sketch {
  display: grid;
  gap: 0.375rem;
  max-width: 20rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-size: 0.625rem;
  line-height: 1.3;
  color: var(--muted-foreground);
}

.sketch--card {
  max-width: 16rem;
  border-radius: var(--radius-lg);
  background: var(--muted);
}

.sketch__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.sketch__stack {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.25rem;
}

.sketch__heading,
.sketch__title {
  font-weight: var(--weight-semibold);
  color: var(--foreground);
}

.sketch__title {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
}

.sketch__line {
  display: block;
  height: 0.3125rem;
  border-radius: var(--radius-full);
  background: var(--border);
}

.sketch__line--80 {
  width: 80%;
}

.sketch__line--70 {
  width: 70%;
}

.sketch__line--60 {
  width: 60%;
}

.sketch__line--50 {
  width: 50%;
}

.sketch__line--40 {
  width: 40%;
}

.sketch__mark {
  display: grid;
  gap: 0.125rem;
  padding: 0.25rem 0.375rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--primary) 10%, var(--card));
  color: var(--foreground);
}

.sketch__mark-value {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.picker__anchor {
  position: relative;
}

.ds-root .picker__trigger {
  width: 100%;
  gap: 0.5rem;
}

.picker__value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.picker__value.is-placeholder {
  color: var(--muted-foreground);
}

.popover {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: 22rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-md);
  animation: reveal var(--motion-fast) var(--motion-ease-out);
}

.popover__list,
.sheet__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.picker__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.ds-root .picker__list:focus-visible {
  outline-offset: -2px;
}

.picker__search-wrap {
  position: relative;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.picker__search-wrap .ds-icon {
  position: absolute;
  top: 50%;
  left: 1.25rem;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}

.ds-root .picker__search {
  padding-left: 2.25rem;
}

.picker__group {
  padding: 0.75rem 0.75rem 0.25rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--muted-foreground);
}

.picker__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.picker__option .ds-icon {
  visibility: hidden;
  color: var(--primary);
}

.picker__option[aria-selected='true'] {
  font-weight: var(--weight-semibold);
}

.picker__option[aria-selected='true'] .ds-icon {
  visibility: visible;
}

.picker__option.is-active {
  background: var(--muted);
  box-shadow: inset 3px 0 0 var(--primary);
}

.picker__empty {
  padding: 0.75rem;
  color: var(--muted-foreground);
}

.picker__empty:empty {
  display: none;
}

.layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.layer > * {
  pointer-events: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in oklab, var(--foreground) 60%, transparent);
  animation: fade-in var(--motion-base) var(--motion-ease-out);
}

.sheet-host {
  position: absolute;
  inset: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

.dialog {
  max-height: calc(100% - 2rem);
  overflow-y: auto;
  animation: reveal var(--motion-base) var(--motion-ease-out);
}

.dialog--wide {
  max-width: 36rem;
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ds-root .dialog__close {
  flex-shrink: 0;
  margin: -0.5rem -0.75rem -0.5rem 0;
}

.dialog__body {
  display: grid;
  gap: 1rem;
}

.sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  animation: sheet-in var(--motion-base) var(--motion-ease-out);
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sheet__title {
  font-size: var(--text-lg);
}

.sheet__search .picker__search-wrap {
  padding: 0.75rem 1rem;
}

.sheet__search .picker__search-wrap .ds-icon {
  left: 1.75rem;
}

.sheet .picker__list {
  padding: 0.25rem 0.5rem 1rem;
}

.sheet .picker__option {
  font-size: var(--text-base);
}

.code__row {
  display: flex;
  gap: 0.5rem;
}

.ds-root .code__box {
  flex: 1 1 0;
  min-width: 0;
  max-width: 3.25rem;
  min-height: 3.5rem;
  padding: 0;
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.code {
  display: grid;
  gap: 0.75rem;
}

.resend {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}

.resend__status:empty {
  display: none;
}

.ds-root .back-link {
  justify-self: start;
  padding-inline: 0.5rem;
}

.note {
  align-items: flex-start;
  box-shadow: none;
}

.note__body {
  display: grid;
  gap: 0.25rem;
  color: var(--foreground);
}

.ds-alert--warning .note__body {
  color: var(--warning-strong);
}

.ds-alert--info .ds-icon {
  color: var(--primary);
}

.error-summary {
  display: grid;
  gap: 0.5rem;
  border-left-width: 4px;
  border-left-color: var(--danger);
}

.error-summary__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.error-summary__list {
  display: grid;
  gap: 0.375rem;
  padding-left: 1.5rem;
}

.error-summary a {
  color: var(--danger-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.add-btn,
.remove-btn {
  justify-self: start;
}

.ds-root .remove-btn {
  padding-inline: 0.5rem;
  font-size: var(--text-sm);
}

.berater {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.berater__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  border: 1px dashed var(--muted-foreground);
  font-weight: var(--weight-semibold);
  color: var(--muted-foreground);
}

.berater__text {
  display: grid;
  gap: 0.125rem;
}

.berater__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.berater__tel {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  color: var(--primary);
  font-weight: var(--weight-medium);
  text-underline-offset: 3px;
}

.berater__hint {
  margin-top: 0.25rem;
}

.doc-links {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  list-style: none;
}

.ds-root .doc-link {
  justify-content: flex-start;
  text-align: left;
}

.duration,
.mail-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
}

.camera {
  position: relative;
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 2rem 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--neutral-strong);
  color: var(--primary-foreground);
}

.camera__frame {
  position: relative;
  width: min(100%, 18rem);
  aspect-ratio: 85.6 / 54;
  overflow: hidden;
  border: 2px dashed var(--primary-foreground);
  border-radius: var(--radius-lg);
}

.camera__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-foreground);
  box-shadow: 0 0 12px var(--primary-foreground);
  animation: scan 1s var(--motion-ease) infinite alternate;
}

@keyframes scan {
  from {
    top: 8%;
  }
  to {
    top: 92%;
  }
}

.camera__text {
  text-align: center;
}

.plain-list {
  display: grid;
  gap: 0.25rem;
  padding-left: 1.25rem;
}

.eid__bar > span {
  width: 40%;
  animation: eid 1.6s var(--motion-ease) forwards;
}

@keyframes eid {
  from {
    width: 5%;
  }
  to {
    width: 100%;
  }
}

.done-panel {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.done-panel__title {
  font-weight: var(--weight-semibold);
}

.iban__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.iban__current {
  display: grid;
  gap: 0.125rem;
}

.iban__label {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.iban__value {
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.kid__prefill {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.acc-list {
  display: grid;
  gap: 0.5rem;
}

.acc {
  overflow: hidden;
}

.acc__head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-right: 0.5rem;
}

.acc__title {
  flex: 1;
  min-width: 0;
  font-size: inherit;
}

.acc__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border: 0;
  border-radius: var(--radius-xl);
  background: none;
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
}

.acc__name {
  flex: 1;
}

.acc__chevron {
  transition: transform var(--motion-fast) var(--motion-ease);
}

.acc__toggle[aria-expanded='true'] .acc__chevron {
  transform: rotate(180deg);
}

.acc__panel {
  padding: 0 1rem 1rem;
}

.kenntnis {
  display: grid;
  gap: 0.375rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--muted);
}

.kenntnis__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold) !important;
}

.docs {
  display: grid;
  gap: 0.5rem;
}

.doc-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.125rem 0.75rem;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  font: inherit;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
}

.doc-tile:hover {
  background: var(--muted);
}

.doc-tile__icon {
  grid-row: span 2;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.doc-tile__name {
  font-weight: var(--weight-semibold);
}

.doc-tile__meta {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.paper {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
}

.paper__brand {
  color: var(--primary);
  font-weight: var(--weight-semibold);
}

.paper__title {
  margin-bottom: 0.5rem;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.paper__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dotted var(--border);
  overflow-wrap: anywhere;
}

.paper__row span:first-child {
  color: var(--muted-foreground);
}

.paper__line {
  display: block;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background: var(--muted);
}

.paper__line--80 {
  width: 80%;
}

.paper__line--70 {
  width: 70%;
}

.paper__line--60 {
  width: 60%;
}

.sign {
  display: grid;
  gap: 1rem;
}

.sign__bar > span {
  transition: width 0.5s var(--motion-ease);
}

.sign__status {
  font-weight: var(--weight-medium);
}

.reference {
  font-size: var(--text-base);
}

.reference strong {
  font-variant-numeric: tabular-nums;
}

.next-steps {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.5rem;
}

.todo {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.todo__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.todo__list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
}

.todo__list li {
  display: grid;
  gap: 0.125rem;
}

.side-steps {
  display: grid;
  gap: 0.125rem;
  padding: 0;
  list-style: none;
}

.sidebar__title {
  margin-bottom: 0.5rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold) !important;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}

.side-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: none;
  font: inherit;
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
  text-align: left;
}

.side-step__mark {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  margin-inline: 0.125rem;
  border: 2px solid var(--muted-foreground);
  border-radius: var(--radius-full);
}

.side-step.is-current {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.side-step.is-current .side-step__mark {
  border-color: var(--primary-foreground);
  background: var(--primary-foreground);
}

.side-step.is-done {
  color: var(--foreground);
  cursor: pointer;
}

.side-step.is-done:hover {
  background: var(--muted);
}

.side-step__icon {
  color: var(--success);
}

.contract {
  margin-top: 1.5rem;
}

@container device (min-width: 768px) {
  .ds-root .ds-input,
  .ds-root .ds-select {
    font-size: var(--text-sm);
  }

  .ds-root .code__box {
    font-size: var(--text-2xl);
  }

  .brandbar,
  .stepbar {
    max-width: 35rem;
    padding-inline: 0;
  }

  .ds-root .stepbar__back {
    margin-left: -0.75rem;
  }

  .step-content {
    flex: 0 0 auto;
    max-width: 35rem;
    margin-inline: auto;
    padding: 2rem 0 1.5rem;
  }

  .step-title {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl--line-height);
  }

  .actionbar {
    position: static;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 35rem;
    margin-inline: auto;
    padding: 0 0 3rem;
    border-top: 0;
    background: none;
  }

  .ds-root .actionbar .ds-btn {
    width: auto;
    min-width: 11rem;
    padding-inline: 2rem;
  }

  .box {
    padding: 1.25rem 1.5rem;
  }

  .facts__list {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 0.5rem 1rem;
  }

  .facts__list dt,
  .facts__list dt:first-child {
    margin-top: 0;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
  }

  .pair--street {
    grid-template-columns: minmax(0, 1fr) 8rem;
  }

  .pair--plz {
    grid-template-columns: 8rem minmax(0, 1fr);
  }

  .pair--dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pair--dates .field--date .ds-input {
    max-width: none;
  }

  .choices--seg {
    max-width: 24rem;
  }

  .choices--seg.cols-3 {
    max-width: none;
  }

  .choices.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .docs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container device (min-width: 1024px) {
  .brandbar,
  .stepbar {
    max-width: 56rem;
  }

  .app-body.has-sidebar {
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    max-width: 64rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
  }

  .app-body.has-sidebar .main {
    flex: 0 1 35rem;
  }

  .app-body.has-sidebar .step-content,
  .app-body.has-sidebar .actionbar {
    max-width: none;
  }

  .sidebar {
    display: block;
    flex: 0 0 18rem;
    position: sticky;
    top: calc(var(--header-h, 6.5rem) + 2rem);
    align-self: flex-start;
    margin-top: 2rem;
    padding-bottom: 2rem;
  }

  .sidebar[hidden] {
    display: none;
  }

  .contract .facts__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
  }

  .contract .facts__list dt {
    margin-top: 0.5rem;
    font-size: var(--text-xs);
  }

  .contract .facts__list dt:first-child {
    margin-top: 0;
  }
}

.demo {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 100;
  width: min(19rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  overflow-y: auto;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg);
  background: var(--neutral-muted);
  color: var(--neutral-strong);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.demo:not(.is-open) {
  width: auto;
}

.demo[hidden] {
  display: none;
}

.demo :focus-visible {
  outline-color: var(--neutral-strong) !important;
}

.demo__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 0.75rem;
}

.demo__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.demo__badge {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--neutral-strong);
  color: var(--neutral-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo__chevron {
  transition: transform var(--motion-fast) var(--motion-ease);
}

.demo.is-open .demo__chevron {
  transform: rotate(180deg);
}

.demo__count {
  margin-left: auto;
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.demo__body {
  display: grid;
  gap: 0.875rem;
  padding: 0.25rem 0.75rem 0.875rem;
  border-top: 1px solid var(--neutral-line);
}

.demo__group {
  display: grid;
  gap: 0.375rem;
}

.demo__legend {
  margin-bottom: 0.125rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
}

.demo__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.demo__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
}

.demo__opt input {
  margin: 0;
  accent-color: var(--neutral-strong);
}

.demo__opt:has(:checked) {
  border-color: var(--neutral-strong);
  font-weight: var(--weight-semibold);
}

.demo__switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.25rem;
  cursor: pointer;
}

.ds-root .demo__switch:checked {
  background: var(--neutral-strong);
}

.demo__select {
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-md);
  background: var(--card);
  font: inherit;
  color: inherit;
}

.demo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo__btn {
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--neutral-strong);
  border-radius: var(--radius-md);
  background: var(--card);
  font: inherit;
  font-weight: var(--weight-medium);
  color: inherit;
  cursor: pointer;
}

.demo__btn:hover {
  background: var(--neutral-line);
}

.demo__status:empty {
  display: none;
}

@media (max-width: 767px) {
  .demo {
    bottom: 5.75rem;
    max-height: calc(100vh - 7rem);
  }

  /* On a phone-sized window the demo tab floats over the content, so the last control must scroll clear of it. */
  body:not(.ohne-demo) .step-content {
    padding-bottom: 4.5rem;
  }
}

@media (forced-colors: active) {
  .seg__input:checked + .seg__face,
  .tile:has(:checked),
  .side-step.is-current {
    outline: 2px solid CanvasText;
  }

  .check-input:checked::before {
    border-color: Canvas;
  }
}

.decl {
  display: grid;
  gap: 0;
}

.decl .disclosure-wrap {
  padding-left: 1.75rem;
}
