:root {
  color-scheme: light;
  --paper: #f7f5f2;
  --surface: #fff;
  --ink: #17191f;
  --muted: #77736d;
  --line: #dedbd5;
  --orange: #ef5b2a;
  --blue: #8ec5ff;
  --danger: #b53b2d;
  --shadow: 0 22px 70px rgba(24, 20, 16, 0.08);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100svh;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: 10px;
}
.skip:focus {
  top: 12px;
}
header {
  height: 76px;
  width: min(100% - 48px, 1180px);
  margin: auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}
.brand span,
.eyebrow {
  color: var(--orange);
}
.saved {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  min-height: 1em;
}
.saved.ok:before {
  content: "✓ ";
  color: #338164;
}
.theme {
  width: 38px;
  height: 38px;
  margin-left: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
main {
  width: min(100% - 48px, 980px);
  min-height: calc(100svh - 76px);
  margin: auto;
  padding: 32px 0 48px;
  display: flex;
  flex-direction: column;
}
.loading {
  margin: auto;
  text-align: center;
  color: var(--muted);
}
.loading span {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.progress {
  margin-bottom: clamp(32px, 6vh, 66px);
}
.stage-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stage-row span.active {
  color: var(--ink);
}
.track {
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  background: var(--orange);
  transition: width 0.35s ease;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: enter 0.3s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.content {
  flex: 1;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1 {
  max-width: 850px;
  margin: 0 0 17px;
  font-size: clamp(2.65rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}
h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: -0.045em;
}
.lead {
  max-width: 680px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 0.76rem;
  font-weight: 720;
}
.optional {
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  padding: 15px 16px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 12%, transparent);
}
.hint {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(12px);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.button {
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}
.button:disabled {
  opacity: 0.45;
  cursor: wait;
  transform: none;
}
.error {
  min-height: 20px;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 650;
  margin: 14px 0 0;
}
.welcome-card {
  margin: auto 0;
}
.welcome-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.76rem;
}
.uploader {
  grid-column: 1/-1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 28px;
  text-align: center;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.uploader.drag {
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 6%, var(--surface));
}
.uploader input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.uploader label {
  cursor: pointer;
}
.uploader strong {
  display: block;
  margin-bottom: 8px;
}
.files {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
}
.file {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.file i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--paper);
  border-radius: 9px;
  font-style: normal;
}
.file span {
  min-width: 0;
}
.file strong,
.file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file small {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 3px;
}
.file button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.summary {
  display: grid;
  gap: 10px;
}
.summary-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.summary-head button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 700;
  cursor: pointer;
}
.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}
.success-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 1.8rem;
}
.expired {
  margin: auto;
  max-width: 720px;
}
.expired h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e111c;
  --surface: #151927;
  --ink: #f6f2eb;
  --muted: #969baa;
  --line: #2b3040;
  --orange: #8ec5ff;
  --blue: #8ec5ff;
  --danger: #ff8c7d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 700px) {
  header,
  main {
    width: min(100% - 32px, 980px);
  }
  header {
    height: 64px;
  }
  main {
    min-height: calc(100svh - 64px);
    padding: 24px 0 30px;
  }
  .stage-row span {
    font-size: 0;
  }
  .stage-row span:before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  h1 {
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }
  .actions .button {
    flex: 1;
    padding-inline: 14px;
  }
  .uploader {
    padding: 22px 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
