/*
  Modal 09 — Multi-step Export Dialog — standalone HTML/CSS/JS.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --flow-fg: oklch(0.18 0 0);
  --flow-muted: oklch(0.5 0 0);
  --flow-line: oklch(0.915 0 0);
  --flow-rail: oklch(0.975 0 0);
  --flow-danger: oklch(0.55 0.2 27);
  --flow-accent: #39ff14;
}

.modal09 {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.modal09[hidden],
.modal09 [hidden] {
  display: none !important;
}

.modal09 *,
.modal09 *::before,
.modal09 *::after {
  box-sizing: border-box;
}

.modal09 p,
.modal09 h2,
.modal09 h3,
.modal09 ol,
.modal09 dl,
.modal09 dd {
  margin: 0;
}

.modal09 ol {
  padding: 0;
  list-style: none;
}

.modal09 svg {
  display: block;
}

/* A deep slate dim with no blur: a task that takes a few steps deserves the
   room to itself. */
.modal09__backdrop {
  position: fixed;
  inset: 0;
  background-color: oklch(0.18 0.012 260 / 0.55);
  animation: modal09-fade-in 220ms ease-out both;
}

.modal09[data-state="closing"] .modal09__backdrop {
  animation: modal09-fade-out 160ms ease-in both;
}

.modal09__positioner {
  position: relative;
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Unfolds from the top edge. */
.modal09__panel {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 45rem;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #ffffff;
  box-shadow: 0 32px 80px -28px rgba(2, 6, 23, 0.55);
  transform-origin: 50% 0%;
  animation: modal09-unfold 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal09[data-state="closing"] .modal09__panel {
  animation: modal09-fade-out 160ms ease-in both;
}

.modal09__rail {
  border-bottom: 1px solid var(--flow-line);
  background-color: var(--flow-rail);
  padding: 1.25rem 3.5rem 1rem 1.25rem;
}

.modal09__title {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--flow-fg);
}

.modal09__intro {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.25rem;
  color: var(--flow-muted);
}

.modal09__bar {
  height: 0.25rem;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 9999px;
  background-color: var(--flow-line);
}

.modal09__bar span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background-color: var(--flow-fg);
  transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal09__steps {
  position: relative;
  display: none;
  margin-top: 1.5rem !important;
}

.modal09__track {
  position: absolute;
  top: 1.375rem;
  bottom: 1.375rem;
  left: 11px;
  width: 0.125rem;
  border-radius: 9999px;
  background-color: var(--flow-line);
}

/* The rail's trace grows as steps are completed. */
.modal09__trace {
  display: block;
  width: 100%;
  border-radius: 9999px;
  background-color: var(--flow-accent);
  transition: height 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal09__rail-step {
  position: relative;
  display: flex;
  height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
}

.modal09__marker {
  display: flex;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--flow-line);
  border-radius: 9999px;
  background-color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--flow-muted);
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal09__marker svg {
  display: none;
  width: 0.75rem;
  height: 0.75rem;
}

.modal09__rail-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--flow-muted);
}

.modal09__rail-step[data-state="current"] .modal09__marker {
  border: 2px solid var(--flow-fg);
  color: var(--flow-fg);
}

.modal09__rail-step[data-state="current"] .modal09__rail-label {
  font-weight: 600;
  color: var(--flow-fg);
}

.modal09__rail-step[data-state="done"] .modal09__marker {
  border-color: var(--flow-fg);
  background-color: var(--flow-fg);
  color: #ffffff;
}

.modal09__rail-step[data-state="done"] .modal09__marker svg {
  display: block;
}

.modal09__rail-step[data-state="done"] .modal09__number {
  display: none;
}

.modal09__rail-step[data-state="done"] .modal09__rail-label {
  color: var(--flow-fg);
}

.modal09__close,
.modal09__secondary,
.modal09__primary,
.modal09__change {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    text-decoration-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal09__close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0;
  background: transparent;
  color: var(--flow-muted);
}

.modal09__close:hover {
  background-color: var(--flow-rail);
  color: var(--flow-fg);
}

.modal09__close svg {
  width: 1rem;
  height: 1rem;
}

.modal09__main,
.modal09__form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.modal09__form {
  flex: 1;
}

.modal09__content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  animation: modal09-step-in 240ms ease-out both;
}

.modal09__eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--flow-muted);
}

.modal09__heading {
  margin-top: 0.25rem !important;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--flow-fg);
  outline: none;
}

.modal09__fieldset {
  min-width: 0;
  margin: 1rem 0 0;
  border: 0;
  padding: 0;
}

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

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

.modal09__card {
  position: relative;
  display: flex;
  gap: 0.75rem;
  border: 1px solid var(--flow-line);
  border-radius: 0.75rem;
  padding: 0.875rem;
  cursor: pointer;
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal09__card:hover,
.modal09__card:has(:checked) {
  background-color: var(--flow-rail);
}

.modal09__card:has(:checked) {
  border-color: var(--flow-fg);
}

.modal09__card:has(:focus-visible) {
  outline: 2px solid var(--flow-fg);
  outline-offset: 2px;
}

.modal09__dot {
  display: flex;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  border: 1px solid oklch(0.78 0 0);
  border-radius: 9999px;
  background-color: #ffffff;
}

.modal09__dot span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--flow-fg);
  transform: scale(0);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal09__card input:checked + .modal09__dot {
  border-color: var(--flow-fg);
}

.modal09__card input:checked + .modal09__dot span {
  transform: scale(1);
}

.modal09__card-text {
  min-width: 0;
  flex: 1;
}

.modal09__card-title {
  display: block;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--flow-fg);
}

.modal09__card-title span {
  font-weight: 400;
  color: var(--flow-muted);
}

.modal09__card-description {
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--flow-muted);
}

.modal09__card-count {
  font-size: 0.75rem;
  line-height: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--flow-muted);
}

.modal09__check {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--flow-fg);
  cursor: pointer;
}

.modal09__box {
  display: flex;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid oklch(0.78 0 0);
  border-radius: 4px;
  color: transparent;
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal09__box svg {
  width: 0.75rem;
  height: 0.75rem;
}

.modal09__check input:checked + .modal09__box {
  border-color: var(--flow-fg);
  background-color: var(--flow-fg);
  color: #ffffff;
}

.modal09__check input:focus-visible + .modal09__box {
  outline: 2px solid var(--flow-fg);
  outline-offset: 2px;
}

.modal09__email-field {
  margin-top: 1rem;
}

.modal09__email-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--flow-fg);
}

.modal09__email {
  display: block;
  width: 100%;
  height: 2.5rem;
  margin-top: 0.375rem;
  border: 1px solid var(--flow-line);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--flow-fg);
  outline: none;
}

.modal09__email[aria-invalid="true"] {
  border-color: var(--flow-danger);
}

.modal09__error {
  margin-top: 0.375rem !important;
  font-size: 13px;
  line-height: 1.25rem;
  color: var(--flow-danger);
}

.modal09__review {
  margin-top: 0.75rem !important;
}

.modal09__review-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--flow-line);
  padding: 0.75rem 0;
}

.modal09__review-row:last-child {
  border-bottom: 0;
}

.modal09__review-row dt {
  width: 4rem;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--flow-muted);
}

.modal09__review-detail {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--flow-fg);
}

.modal09__review-row dd:last-child {
  flex-shrink: 0;
}

.modal09__change {
  height: 2rem;
  border-radius: 0.375rem;
  padding: 0 0.5rem;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--flow-fg);
  text-decoration: underline;
  text-decoration-color: var(--flow-line);
  text-underline-offset: 4px;
}

.modal09__change:hover {
  text-decoration-color: var(--flow-fg);
}

.modal09__done {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
  animation: modal09-step-in 240ms ease-out both;
}

.modal09__done-mark {
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--flow-accent);
  color: var(--flow-fg);
}

.modal09__done-mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal09__done .modal09__heading {
  margin-top: 1rem !important;
}

.modal09__done-text {
  max-width: 18rem;
  margin-top: 0.25rem !important;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--flow-muted);
}

.modal09__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--flow-line);
  padding: 1rem 1.25rem;
}

.modal09__secondary {
  height: 2.5rem;
  border-radius: 0.5rem;
  padding: 0 1rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--flow-muted);
}

.modal09__secondary:hover {
  background-color: var(--flow-rail);
  color: var(--flow-fg);
}

.modal09__primary {
  display: flex;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-left: auto;
  border-radius: 0.5rem;
  padding: 0 1rem;
  background-color: var(--flow-fg);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.modal09__primary:hover {
  background-color: oklch(0.3 0 0);
}

.modal09__primary svg {
  width: 1rem;
  height: 1rem;
  animation: modal09-spin 800ms linear infinite;
}

.modal09__secondary[aria-disabled="true"],
.modal09__close[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.modal09__primary[aria-disabled="true"] {
  cursor: progress;
}

.modal09__close:focus-visible,
.modal09__secondary:focus-visible,
.modal09__primary:focus-visible,
.modal09__change:focus-visible,
.modal09__email:focus-visible {
  outline: 2px solid var(--flow-fg);
  outline-offset: 2px;
}

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

@keyframes modal09-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes modal09-unfold {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal09-step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal09-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 40rem) {
  .modal09__panel {
    display: grid;
    height: 27rem;
    grid-template-columns: 13rem minmax(0, 1fr);
  }
  .modal09__rail {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--flow-line);
    border-bottom: 0;
    padding: 1.5rem 1.25rem;
  }
  .modal09__intro {
    position: static;
    width: auto;
    height: auto;
    margin: 0.25rem 0 0 !important;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .modal09__bar {
    display: none;
  }
  .modal09__steps {
    display: block;
  }
  .modal09__content {
    padding: 1.75rem 3.5rem 1.25rem 1.75rem;
  }
  .modal09__cards--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .modal09__cards--three .modal09__card {
    flex-direction: column;
    gap: 0.625rem;
  }
  .modal09__cards--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal09__review-row dt {
    width: 5rem;
  }
  .modal09__footer {
    padding: 1rem 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal09__panel,
  .modal09__content,
  .modal09__done {
    animation-name: modal09-fade-in;
    animation-duration: 120ms;
  }
  .modal09[data-state="closing"] .modal09__panel {
    animation-name: modal09-fade-out;
  }
  .modal09__trace,
  .modal09__bar span {
    transition: none;
  }
  .modal09__primary svg {
    animation-duration: 2400ms;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
p {
  margin: 0;
}
.modal09-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
}
.modal09-layout__app {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 60rem;
  height: 39rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 18px 44px -20px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
}
@media (min-width: 25rem) {
  .modal09-layout__app {
    height: 37rem;
  }
}
.modal09-layout__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid oklch(0.97 0 0);
  padding: 0.875rem 1.5rem;
}
.modal09-layout__heading {
  min-width: 0;
}
.modal09-layout__name {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: oklch(0.205 0 0);
}
.modal09-layout__meta {
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
.modal09-layout__export {
  display: flex;
  height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid oklch(0.922 0 0);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: oklch(0.371 0 0);
  cursor: pointer;
  outline: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal09-layout__export:hover {
  background: oklch(0.985 0 0);
}
.modal09-layout__export:focus-visible {
  outline: 2px solid oklch(0.205 0 0);
  outline-offset: 2px;
}
.modal09-layout__export svg {
  display: block;
  width: 1rem;
  height: 1rem;
}
.modal09-layout__table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.modal09-layout__table th {
  border-bottom: 1px solid oklch(0.97 0 0);
  padding: 0.625rem 1.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: oklch(0.556 0 0);
}
.modal09-layout__table td {
  border-bottom: 1px solid oklch(0.97 0 0);
  padding: 0.75rem 1.5rem;
  color: oklch(0.556 0 0);
}
.modal09-layout__table td:first-child {
  color: oklch(0.205 0 0);
}
.modal09-layout__table .modal09-layout__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.modal09-layout__wide {
  display: none;
}
@media (min-width: 40rem) {
  .modal09-layout__app {
    height: 31rem;
  }
  .modal09-layout__wide {
    display: table-cell;
  }
}
