@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  --purple: #5637a8;
  --purple-dark: #3f2684;
  --purple-soft: #f0ebff;
  --yellow: #ffd84d;
  --yellow-soft: #fff7cf;
  --ink: #29243a;
  --muted: #716b7f;
  --line: #e7e2ee;
  --paper: #ffffff;
  --canvas: #faf9fc;
  --green: #198754;
  --green-soft: #e7f7ef;
  --red: #c44256;
  --red-soft: #fff0f2;
  --shadow: 0 24px 70px rgba(56, 38, 101, 0.10);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.page-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
  z-index: -1;
}
.page-glow-one { width: 360px; height: 360px; background: #eee7ff; top: -170px; right: -100px; }
.page-glow-two { width: 240px; height: 240px; background: #fff2ac; top: 390px; left: -150px; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 27px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: inherit; display: flex; align-items: center; gap: 15px; text-decoration: none; }
.brand-name { font: 800 31px/1 "Manrope", sans-serif; letter-spacing: -1.8px; color: var(--purple); }
.brand-name span { color: var(--yellow); }
.brand-product { border-left: 1px solid var(--line); padding-left: 15px; color: var(--muted); font-size: 14px; font-weight: 600; }
.privacy-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.privacy-note svg { width: 18px; fill: none; stroke: var(--purple); stroke-width: 1.8; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-button { border: 0; background: transparent; color: var(--muted); min-height: 38px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.nav-button:hover, .nav-button.is-active { color: var(--purple); background: var(--purple-soft); }
.nav-count { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: var(--purple); color: white; font-size: 10px; }

.main-shell { width: min(1000px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 80px; }
.intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 56px; align-items: center; margin: 36px 0 55px; }
.eyebrow, .section-kicker { margin: 0 0 16px; color: var(--purple); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 26px; height: 3px; border-radius: 4px; background: var(--yellow); }
h1, h2 { font-family: "Manrope", sans-serif; letter-spacing: -.045em; }
h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); line-height: 1.03; font-weight: 800; }
h1 em { color: var(--purple); font-style: normal; }
.lede { max-width: 665px; color: var(--muted); font-size: 18px; line-height: 1.65; margin: 24px 0 0; }

.intro-art { height: 215px; position: relative; }
.art-card { position: absolute; border-radius: 20px; box-shadow: 0 18px 50px rgba(63, 38, 132, .16); }
.art-card-back { width: 210px; height: 135px; background: var(--yellow); transform: rotate(7deg); top: 24px; right: 7px; padding: 25px; display: grid; align-content: start; gap: 12px; }
.art-card-back span { display: block; height: 8px; border-radius: 5px; background: rgba(71, 50, 107, .18); }
.art-card-back span:nth-child(2) { width: 70%; }
.art-card-back span:nth-child(3) { width: 45%; }
.art-card-front { width: 238px; min-height: 118px; background: var(--purple); color: white; transform: rotate(-5deg); left: 0; bottom: 11px; padding: 25px 22px; display: flex; align-items: center; gap: 15px; }
.art-card-front strong, .art-card-front small { display: block; }
.art-card-front strong { font-size: 16px; margin-bottom: 5px; }
.art-card-front small { color: #dcd3fa; }
.art-check { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--purple-dark); font-weight: 900; font-size: 20px; }
.spark { position: absolute; color: var(--purple); font-size: 25px; }
.spark-one { top: 2px; left: 15px; }
.spark-two { right: -15px; bottom: 9px; color: #f3bd1d; font-size: 18px; }

.workspace-card { background: var(--paper); border: 1px solid rgba(86,55,168,.09); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 52px); }
.steps { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 18px; padding-bottom: 34px; margin-bottom: 39px; border-bottom: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 11px; color: #a29daa; }
.step > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #d9d4e0; border-radius: 50%; font-weight: 700; font-size: 13px; }
.step strong, .step small { display: block; white-space: nowrap; }
.step strong { font-size: 13px; }
.step small { font-size: 11px; margin-top: 2px; }
.step.is-active { color: var(--ink); }
.step.is-active > span { background: var(--purple); color: white; border-color: var(--purple); }
.step-line { height: 1px; background: var(--line); min-width: 20px; }
.card-heading { text-align: center; max-width: 650px; margin: 0 auto 30px; }
.card-heading .section-kicker { margin-bottom: 10px; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 39px); line-height: 1.15; }
.card-heading > p:last-child, .progress-heading p, .error-card > p { color: var(--muted); line-height: 1.6; }

.drop-zone { min-height: 245px; border: 2px dashed #cfc5e8; border-radius: 20px; background: #fbfaff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: .2s ease; padding: 28px; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { width: 60px; height: 60px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); border-radius: 18px; margin-bottom: 17px; }
.upload-icon svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-family: "Manrope", sans-serif; font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.drop-help { color: var(--muted); font-size: 14px; }
.drop-help u { color: var(--purple); font-weight: 700; text-underline-offset: 3px; }
.file-types { color: #a09aa9; font-size: 11px; margin-top: 17px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.selected-file { display: flex; align-items: center; gap: 15px; margin-top: 16px; padding: 15px; border: 1px solid #dcd3f2; background: #fbfaff; border-radius: 15px; }
.file-icon { width: 46px; height: 46px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border-radius: 11px; font-size: 11px; font-weight: 800; }
.file-details { min-width: 0; flex: 1; }
.file-details strong, .file-details small { display: block; }
.file-details strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.file-details small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; padding: 5px 10px; }
.email-field { display: grid; gap: 8px; margin-top: 22px; text-align: left; color: var(--ink); font-size: 14px; font-weight: 700; }
.email-field > span small { color: var(--muted); font-weight: 500; margin-left: 5px; }
.email-field > span strong { color: var(--red); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-left: 5px; }
.email-field input { width: 100%; min-height: 52px; border: 1px solid var(--line); background: #fbfaff; border-radius: 13px; padding: 0 16px; color: var(--ink); outline: none; }
.email-field input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.email-field > small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.upload-name-field { margin-top: 0; margin-bottom: 18px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.primary-button, .secondary-button { min-height: 52px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 25px; font-weight: 800; cursor: pointer; text-decoration: none; transition: .18s ease; }
.primary-button { background: var(--purple); color: white; box-shadow: 0 9px 24px rgba(86,55,168,.22); }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.primary-button:disabled { background: #d7d1df; box-shadow: none; cursor: not-allowed; transform: none; }
.secondary-button { background: var(--purple-soft); color: var(--purple); }
.secondary-button:hover { background: #e6ddff; }
.text-button { border: 0; background: transparent; color: var(--purple); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; }
.text-button svg, .download-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.progress-card { max-width: 820px; margin: 0 auto; }
.history-card { max-width: 940px; margin: 0 auto; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.history-heading .section-kicker { margin-bottom: 9px; }
.history-heading p:last-child { color: var(--muted); margin: 10px 0 0; }
.history-heading-actions { display: flex; gap: 9px; }
.compact-button { min-height: 42px; padding: 0 18px; font-size: 13px; }
.history-loading { padding: 50px 0; text-align: center; color: var(--muted); }
.history-empty { padding: 55px 20px 25px; text-align: center; }
.history-empty > span { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); border-radius: 18px; font-size: 25px; }
.history-empty h3 { margin: 0 0 8px; font: 800 21px "Manrope", sans-serif; }
.history-empty p { color: var(--muted); margin: 0 0 23px; }
.history-list { display: grid; gap: 12px; padding-top: 24px; }
.history-item { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(140px, .7fr) minmax(125px, .6fr) auto; align-items: center; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; transition: .18s ease; }
.history-item:hover { border-color: #cfc3ed; box-shadow: 0 8px 22px rgba(63,38,132,.07); }
.history-file { min-width: 0; display: flex; align-items: center; gap: 13px; }
.history-file-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); border-radius: 11px; font-size: 10px; font-weight: 900; }
.history-file strong, .history-file small, .history-meta strong, .history-meta small { display: block; }
.history-file strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.history-file small, .history-meta small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.history-meta strong { font-size: 13px; }
.status-pill { width: max-content; border-radius: 999px; padding: 7px 10px; background: var(--purple-soft); color: var(--purple); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.status-pill.completed { color: var(--green); background: var(--green-soft); }
.status-pill.completed_with_errors { color: var(--red); background: var(--red-soft); }
.status-pill.stopped { color: #8a6916; background: var(--yellow-soft); }
.history-action { justify-self: end; border: 0; background: var(--purple); color: white; border-radius: 999px; min-height: 39px; padding: 0 15px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.history-action:hover { background: var(--purple-dark); }
.progress-heading { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.progress-heading .section-kicker { margin-bottom: 10px; }
.progress-heading p:last-child { margin-bottom: 0; }
.progress-ring { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--purple) var(--progress, 10%), var(--purple-soft) 0); display: grid; place-items: center; position: relative; }
.progress-ring::after { content: ""; position: absolute; width: 66px; height: 66px; border-radius: 50%; background: white; }
.progress-ring strong { z-index: 1; color: var(--purple); font: 800 16px "Manrope", sans-serif; }
.progress-track { height: 8px; background: var(--purple-soft); border-radius: 10px; overflow: hidden; margin: 30px 0 32px; }
.progress-track span { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, var(--purple), #8b6dde); border-radius: inherit; transition: width .5s ease; }
.stage-list { display: grid; }
.stage-row { display: flex; align-items: center; gap: 17px; min-height: 72px; position: relative; color: #a29daa; }
.stage-row:not(:last-child)::after { content: ""; position: absolute; width: 1px; height: 27px; background: var(--line); left: 18px; bottom: -2px; }
.stage-status { flex: 0 0 auto; width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #ddd8e4; border-radius: 50%; font-size: 12px; font-weight: 800; background: white; }
.stage-row strong, .stage-row small { display: block; }
.stage-row strong { font-size: 15px; }
.stage-row small { font-size: 12px; margin-top: 3px; }
.stage-row.is-complete { color: var(--ink); }
.stage-row.is-complete .stage-status { border-color: var(--green); color: white; background: var(--green); }
.stage-row.is-active { color: var(--ink); }
.stage-row.is-active .stage-status { border: 2px solid #c9bced; background: var(--purple-soft); }
.stage-row.is-active .stage-status i { width: 9px; height: 9px; background: var(--purple); border-radius: 50%; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .45; } }
.progress-note { margin-top: 30px; display: flex; gap: 13px; background: var(--yellow-soft); padding: 16px 18px; border-radius: 14px; color: #635321; }
.progress-note span { font-size: 21px; }
.progress-note p { margin: 0; font-size: 13px; line-height: 1.55; }
.run-reference { text-align: center; color: #aaa4b1; font-size: 11px; margin: 18px 0 0; }

.result-card, .error-card { max-width: 800px; margin: 0 auto; text-align: center; }
.success-mark, .error-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 25px; border-radius: 24px; font: 800 30px "Manrope", sans-serif; transform: rotate(-4deg); }
.success-mark { background: var(--yellow); color: var(--purple-dark); }
.error-mark { background: var(--red-soft); color: var(--red); }
.result-card .section-kicker, .error-card .section-kicker { margin-bottom: 10px; }
.result-lede { color: var(--muted); font-size: 17px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 35px 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.result-stats div { padding: 23px 15px; }
.result-stats div + div { border-left: 1px solid var(--line); }
.result-stats strong, .result-stats span { display: block; }
.result-stats strong { font: 800 30px "Manrope", sans-serif; }
.result-stats span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.result-stats .stat-pass strong { color: var(--green); }
.result-stats .stat-error strong { color: var(--red); }
.result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.report-help { max-width: 580px; margin: 24px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.error-card > p:not(.section-kicker) { max-width: 580px; margin: 18px auto 26px; }

.reassurance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 35px 15px 0; }
.reassurance > div { display: flex; align-items: center; justify-content: center; gap: 12px; }
.reassurance > div > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 50%; font-weight: 800; }
.reassurance p { margin: 0; }
.reassurance strong, .reassurance small { display: block; }
.reassurance strong { font-size: 13px; }
.reassurance small { margin-top: 3px; color: var(--muted); font-size: 11px; }
footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 27px 20px; color: var(--muted); font-size: 12px; }
.brand-name.small { font-size: 21px; }
footer p { margin: 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; background: var(--ink); color: white; border-radius: 999px; padding: 13px 20px; box-shadow: 0 12px 35px rgba(41,36,58,.25); font-size: 13px; font-weight: 700; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 760px) {
  .site-header { width: min(100% - 28px, 1180px); }
  .brand-product { display: none; }
  .privacy-note { font-size: 0; }
  .header-actions { gap: 2px; }
  .nav-button { padding: 0 9px; font-size: 11px; }
  .main-shell { width: min(100% - 28px, 1000px); padding-top: 5px; }
  .intro { grid-template-columns: 1fr; margin-top: 30px; gap: 20px; }
  .intro-art { display: none; }
  h1 { font-size: clamp(39px, 12vw, 55px); }
  .lede { font-size: 16px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 7px; padding-bottom: 25px; margin-bottom: 30px; }
  .step { justify-content: center; gap: 6px; }
  .step-line { display: none; }
  .step small { display: none; }
  .step > span { width: 28px; height: 28px; }
  .workspace-card { border-radius: 22px; }
  .form-footer { flex-direction: column-reverse; }
  .form-footer > * { width: 100%; }
  .progress-heading { align-items: flex-start; }
  .history-heading { align-items: flex-start; flex-direction: column; }
  .history-heading-actions { width: 100%; }
  .history-heading-actions > * { flex: 1; }
  .history-item { grid-template-columns: 1fr auto; gap: 13px; }
  .history-meta { display: none; }
  .history-action { grid-column: 2; grid-row: 1 / span 2; }
  .progress-ring { width: 70px; height: 70px; }
  .progress-ring::after { width: 54px; height: 54px; }
  .result-stats { grid-template-columns: 1fr; }
  .result-stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .result-actions { flex-direction: column; }
  .reassurance { grid-template-columns: 1fr; align-items: flex-start; }
  .reassurance > div { justify-content: flex-start; padding-left: 15%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
