.si-completion-shell {
  --si-profile-red: #dc3545;
  --si-profile-red-dark: #bb2d3b;
  --si-profile-ink: #212529;
  --si-profile-muted: #6c757d;
  --si-profile-line: #dee2e6;
  --si-profile-surface: #ffffff;
  --si-profile-soft: #f8f9fa;
  --si-profile-success: #198754;
  --si-profile-radius: 12px;
}

.si-profile-wizard {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  color: var(--si-profile-ink);
}

.si-profile-wizard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas:
    "back progress"
    "title progress"
    "description progress";
  gap: 7px 36px;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid var(--si-profile-line);
  border-top: 4px solid var(--si-profile-red);
  border-radius: var(--si-profile-radius);
  background: var(--si-profile-surface);
  box-shadow: 0 10px 28px rgba(33, 37, 41, 0.07);
}

.si-completion-shell .si-profile-wizard-head > button {
  grid-area: back;
  width: fit-content;
  min-height: 34px;
  gap: 7px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--si-profile-red);
  background: transparent;
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 750;
}

.si-completion-shell .si-profile-wizard-head > button:hover,
.si-completion-shell .si-profile-wizard-head > button:focus-visible {
  color: var(--si-profile-red-dark);
  background: transparent;
  transform: none;
}

.si-profile-wizard-head > button svg,
.si-profile-step-actions svg,
.si-profile-wizard-steps svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.si-profile-wizard-head > button svg.reverse,
.si-profile-step-actions svg.reverse {
  transform: rotate(180deg);
}

.si-profile-wizard-head h2 {
  grid-area: title;
  margin: 0;
  color: var(--si-profile-ink);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.si-profile-wizard-head > p {
  grid-area: description;
  max-width: 680px;
  margin: 0;
  color: var(--si-profile-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.si-profile-wizard-progress {
  grid-area: progress;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(220, 53, 69, 0.16);
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.045);
}

.si-profile-wizard-progress span,
.si-profile-wizard-progress strong {
  font-size: 0.78rem;
  line-height: 1;
}

.si-profile-wizard-progress span {
  color: var(--si-profile-muted);
  font-weight: 700;
}

.si-profile-wizard-progress strong {
  color: var(--si-profile-red-dark);
  font-weight: 800;
}

.si-profile-wizard-progress > div {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ecef;
}

.si-profile-wizard-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--si-profile-red);
  transition: width 220ms ease;
}

.si-profile-wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.si-profile-step-card,
.si-profile-wizard-steps {
  border: 1px solid var(--si-profile-line);
  border-radius: var(--si-profile-radius);
  background: var(--si-profile-surface);
  box-shadow: 0 8px 24px rgba(33, 37, 41, 0.055);
}

.si-profile-step-card {
  min-width: 0;
  overflow: hidden;
}

.si-profile-form-section {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.si-profile-form-section > header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--si-profile-line);
}

.si-profile-form-section h3,
.si-profile-form-section p {
  margin: 0;
}

.si-profile-form-section h3 {
  color: var(--si-profile-ink);
  font-size: 1.18rem;
  line-height: 1.25;
}

.si-profile-form-section header p {
  margin-top: 6px;
  color: var(--si-profile-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.si-profile-form-section-body {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.si-profile-form-grid {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.si-profile-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.si-profile-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.si-profile-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
  color: var(--si-profile-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.si-profile-field > span,
.si-profile-field legend {
  padding: 0;
  color: var(--si-profile-ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.si-profile-field > span strong,
.si-profile-field legend strong {
  margin-left: 2px;
  color: var(--si-profile-red);
}

.si-profile-field-hint,
.si-profile-field > small:not(.si-profile-field-hint) {
  min-height: 17px;
  color: var(--si-profile-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.si-profile-field-hint.placeholder {
  visibility: hidden;
}

.si-profile-field input,
.si-profile-field select,
.si-profile-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #ced4da;
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--si-profile-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.025);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.si-profile-field textarea {
  min-height: 108px;
  resize: vertical;
}

.si-profile-field input:focus,
.si-profile-field select:focus,
.si-profile-field textarea:focus {
  border-color: rgba(220, 53, 69, 0.7);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.si-profile-field input:disabled,
.si-profile-field select:disabled,
.si-profile-field textarea:disabled {
  color: #6c757d;
  background: #f1f3f5;
  opacity: 1;
}

.si-profile-field.has-error input,
.si-profile-field.has-error select,
.si-profile-field.has-error textarea {
  border-color: #b42318;
}

.si-profile-field > em,
.si-profile-form-error,
.si-profile-consent-list > p {
  margin: 0;
  color: #b42318;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 650;
}

.si-profile-field-group {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.si-profile-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.si-completion-shell .si-profile-chip-grid button {
  min-height: 36px;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 999px;
  color: #495057;
  background: #fff;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 650;
}

.si-completion-shell .si-profile-chip-grid button:hover,
.si-completion-shell .si-profile-chip-grid button:focus-visible {
  color: var(--si-profile-red-dark);
  border-color: rgba(220, 53, 69, 0.5);
  background: rgba(220, 53, 69, 0.04);
  transform: none;
}

.si-completion-shell .si-profile-chip-grid button.selected {
  color: #fff;
  border-color: var(--si-profile-red);
  background: var(--si-profile-red);
}

.si-profile-repeat-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--si-profile-line);
  border-radius: 10px;
  background: var(--si-profile-soft);
}

.si-profile-repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.si-profile-repeat-head > strong {
  font-size: 0.9rem;
}

.si-completion-shell .si-profile-repeat-head button,
.si-completion-shell .si-profile-outline-button,
.si-completion-shell .si-profile-clear-draft {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(220, 53, 69, 0.38);
  color: var(--si-profile-red-dark);
  background: #fff;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.si-completion-shell .si-profile-repeat-head button:hover,
.si-completion-shell .si-profile-outline-button:hover,
.si-completion-shell .si-profile-clear-draft:hover {
  color: #fff;
  border-color: var(--si-profile-red);
  background: var(--si-profile-red);
  transform: none;
}

.si-completion-shell .si-profile-outline-button {
  width: fit-content;
}

.si-profile-privacy-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #0dcaf0;
  border-radius: 0 7px 7px 0;
  color: #495057;
  background: rgba(13, 202, 240, 0.08);
  font-size: 0.82rem;
  line-height: 1.5;
}

.si-profile-consent-list {
  display: grid;
  gap: 10px;
}

.si-profile-consent {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--si-profile-line);
  border-radius: 8px;
  color: #495057;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.45;
}

.si-profile-consent input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--si-profile-red);
}

.si-profile-consent.has-error {
  border-color: rgba(180, 35, 24, 0.5);
  background: rgba(180, 35, 24, 0.035);
}

.si-profile-save-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 28px 22px;
  padding: 12px 14px;
  border: 1px solid rgba(25, 135, 84, 0.18);
  border-radius: 8px;
  color: #146c43;
  background: rgba(25, 135, 84, 0.06);
}

.si-profile-save-note > span {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--si-profile-success);
  font-size: 0.78rem;
  font-weight: 850;
}

.si-profile-save-note strong,
.si-profile-save-note small {
  display: block;
}

.si-profile-save-note strong {
  font-size: 0.8rem;
}

.si-profile-save-note small {
  margin-top: 2px;
  color: #497760;
  font-size: 0.74rem;
  line-height: 1.35;
}

.si-profile-save-note.error {
  color: #8f1722;
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.06);
}

.si-profile-save-note.error > span {
  background: #b42318;
}

.si-profile-save-note.error small {
  color: #8f3d44;
}

.si-profile-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--si-profile-line);
  background: var(--si-profile-soft);
}

.si-completion-shell .si-profile-step-actions button {
  min-height: 40px;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--si-profile-red);
  border-radius: 7px;
  color: #fff;
  background: var(--si-profile-red);
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 750;
}

.si-completion-shell .si-profile-step-actions button:hover:not(:disabled) {
  border-color: var(--si-profile-red-dark);
  background: var(--si-profile-red-dark);
  transform: none;
}

.si-completion-shell .si-profile-step-actions button.secondary {
  margin-right: auto;
  color: #495057;
  border-color: #ced4da;
  background: #fff;
}

.si-completion-shell .si-profile-step-actions button.secondary:hover:not(:disabled) {
  color: var(--si-profile-ink);
  border-color: #adb5bd;
  background: #e9ecef;
}

.si-completion-shell .si-profile-step-actions button.text-action {
  color: var(--si-profile-red-dark);
  border-color: transparent;
  background: transparent;
}

.si-completion-shell .si-profile-step-actions button.text-action:hover:not(:disabled) {
  color: var(--si-profile-red-dark);
  border-color: rgba(220, 53, 69, 0.12);
  background: rgba(220, 53, 69, 0.07);
}

.si-completion-shell .si-profile-step-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.si-profile-wizard-steps {
  position: sticky;
  top: calc(var(--vol-task-topbar-height) + 20px);
  overflow: hidden;
}

.si-profile-wizard-steps > div {
  padding: 20px;
  border-bottom: 1px solid var(--si-profile-line);
}

.si-profile-wizard-steps h3,
.si-profile-wizard-steps > div > span {
  display: block;
  margin: 0;
}

.si-profile-wizard-steps h3 {
  font-size: 1rem;
}

.si-profile-wizard-steps > div > span {
  margin-top: 4px;
  color: var(--si-profile-muted);
  font-size: 0.78rem;
}

.si-profile-wizard-steps ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 10px;
  list-style: none;
}

.si-profile-wizard-steps li {
  min-width: 0;
}

.si-completion-shell .si-profile-wizard-steps li > button {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 18px;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--si-profile-ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.si-completion-shell .si-profile-wizard-steps li > button:hover,
.si-completion-shell .si-profile-wizard-steps li > button:focus-visible {
  border-color: var(--si-profile-line);
  background: var(--si-profile-soft);
  transform: none;
}

.si-completion-shell .si-profile-wizard-steps li > button:focus-visible {
  outline: 3px solid rgba(220, 53, 69, 0.22);
  outline-offset: 1px;
}

.si-profile-wizard-steps li > button > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--si-profile-muted);
  background: #e9ecef;
  font-size: 0.75rem;
  font-weight: 800;
}

.si-profile-wizard-steps li > button > strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.si-profile-wizard-steps li > button > em {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--si-profile-muted);
  background: #e9ecef;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.si-profile-wizard-steps li > button > svg {
  width: 16px;
  height: 16px;
  color: #adb5bd;
}

.si-completion-shell .si-profile-wizard-steps li.active > button {
  color: var(--si-profile-red-dark);
  border-color: rgba(220, 53, 69, 0.2);
  background: rgba(220, 53, 69, 0.07);
}

.si-profile-wizard-steps li.active > button > span {
  color: #fff;
  background: var(--si-profile-red);
}

.si-profile-wizard-steps li.active > button > em {
  color: var(--si-profile-red-dark);
  background: rgba(220, 53, 69, 0.11);
}

.si-profile-wizard-steps li.completed > button > span {
  color: #fff;
  background: var(--si-profile-success);
}

.si-profile-wizard-steps li.completed > button > em {
  color: #146c43;
  background: rgba(25, 135, 84, 0.1);
}

.si-completion-shell .si-profile-clear-draft {
  width: calc(100% - 20px);
  margin: 0 10px 10px;
}

@media (max-width: 1080px) {
  .si-profile-wizard-layout {
    grid-template-columns: 1fr;
  }

  .si-profile-wizard-steps {
    position: static;
  }

  .si-profile-wizard-steps ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .si-profile-wizard-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "title"
      "description"
      "progress";
    gap: 7px;
    padding: 20px;
  }

  .si-profile-wizard-progress {
    margin-top: 12px;
  }

  .si-profile-form-grid.two,
  .si-profile-form-grid.three {
    grid-template-columns: 1fr;
  }

  .si-profile-form-section {
    gap: 20px;
    padding: 22px 20px;
  }

  .si-profile-save-note {
    margin: 0 20px 18px;
  }

  .si-profile-step-actions {
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .si-completion-shell .si-profile-step-actions button.secondary {
    margin-right: 0;
  }

  .si-completion-shell .si-profile-step-actions button[type="submit"] {
    flex: 1 1 100%;
    order: -1;
  }

  .si-completion-shell .si-profile-step-actions button.secondary,
  .si-completion-shell .si-profile-step-actions button.text-action {
    flex: 1 1 calc(50% - 5px);
  }

  .si-profile-wizard-steps ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .si-profile-wizard-head h2 {
    font-size: 1.35rem;
  }

  .si-profile-form-section {
    padding: 20px 16px;
  }

  .si-profile-save-note {
    align-items: flex-start;
    margin: 0 16px 16px;
  }

  .si-profile-step-actions {
    padding: 14px 16px;
  }

  .si-completion-shell .si-profile-step-actions button,
  .si-completion-shell .si-profile-step-actions button.secondary,
  .si-completion-shell .si-profile-step-actions button.text-action {
    flex: 1 1 100%;
    width: 100%;
  }

  .si-profile-repeat-head {
    align-items: flex-start;
    display: grid;
  }
}
