.entry-wizard [hidden] {
  display: none !important;
}
.entry-wizard {
  max-width: 800px;
}
.wizard-progress {
  scroll-margin-top: 20px;
  margin: 28px 0 24px;
}
.wizard-progress ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
}
.wizard-progress li {
  min-width: 0;
}
.wizard-progress button {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.wizard-progress button:disabled {
  cursor: default;
}
.wizard-progress [aria-current='step'] {
  color: var(--pine-deep);
  border-color: var(--pine);
}
.wizard-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border-radius: 50%;
  font-weight: 650;
}
.wizard-progress [aria-current='step'] .wizard-step-number {
  background: var(--pine);
  color: var(--white);
}
.wizard-progress [data-complete] .wizard-step-number {
  background: var(--sage);
  color: var(--pine-deep);
}
.wizard-step-label {
  font-size: var(--type-small);
  line-height: 1.4;
  font-weight: 650;
}
.wizard-heading {
  margin-bottom: 8px;
}
.wizard-heading > p:first-child {
  font-size: var(--type-small);
  color: var(--muted);
  margin-bottom: 4px;
}
.wizard-heading > h2 {
  font-size: var(--type-page);
  margin: 0;
}
.wizard-heading > h2:focus {
  outline: none;
}
.wizard-panel > .form-section {
  padding: 24px 0;
}
.wizard-panel > .form-section {
  border-bottom: 0;
}
.wizard-navigation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 8px;
}
.wizard-navigation > [data-wizard-back] {
  grid-column: 1;
  grid-row: 1;
}
.wizard-navigation > [data-wizard-next],
.wizard-navigation > button[type='submit'] {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.entry-wizard .wizard-secondary-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  border: 0;
}
.entry-wizard .wizard-secondary-actions .button {
  width: auto;
  min-height: 36px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  color: var(--pine);
  font-size: var(--type-small);
  font-weight: 550;
}
.entry-wizard .wizard-secondary-actions .button svg {
  width: 17px;
  height: 17px;
}
.entry-wizard .wizard-secondary-actions .button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.wizard-navigation:has(> [data-wizard-back][hidden]) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.wizard-navigation:has(> [data-wizard-back][hidden]) > .wizard-secondary-actions {
  grid-column: 1;
}
.wizard-navigation:has(> [data-wizard-back][hidden]) > [data-wizard-next] {
  grid-column: 2;
}
.wizard-review {
  padding-block: 16px;
}
.wizard-review > p {
  color: var(--muted);
  margin-bottom: 20px;
}
.wizard-review dl > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.wizard-review dt {
  font-weight: 650;
}
.wizard-review dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.wizard-review .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}
.wizard-review .text-button svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 600px) {
  .wizard-progress ol {
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }
  .wizard-progress li {
    flex: 1;
    min-width: 0;
  }
  .wizard-progress button {
    align-items: center;
    padding-bottom: 8px;
    min-height: 44px;
  }
  .wizard-step-label {
    display: none;
  }
  .wizard-progress {
    margin-block: 20px;
  }
  .wizard-review dl > div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .wizard-review dt {
    grid-column: 1;
  }
  .wizard-review dd:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .wizard-review dd:last-child {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .wizard-navigation,
  .wizard-navigation:has(> [data-wizard-back][hidden]) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 12px;
  }
  .wizard-navigation > [data-wizard-next],
  .wizard-navigation > button[type='submit'] {
    grid-column: 2;
    width: auto;
    max-width: 100%;
    white-space: normal;
  }
  .entry-wizard .wizard-secondary-actions,
  .wizard-navigation:has(> [data-wizard-back][hidden]) > .wizard-secondary-actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 360px) {
  body:has(.entry-wizard) .header {
    gap: 0;
    padding-inline: 8px;
  }
  body:has(.entry-wizard) .header-end {
    gap: 0;
  }
}
