:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #201e30;
  background: #f5f5f9;
  font-synthesis: none;
  --muted: #59576e;
  --accent: #4c36ce;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7763ec; outline-offset: 4px; }
.topbar { background: #fbfbfddc; border-bottom: 1px solid #e8e7f0; }
.bar-inner { max-width: 1144px; margin: auto; padding: 0 28px; min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-weight: 680; font-size: 15px; letter-spacing: -.025em; }
.brand-icon { background: #27243e; color: #fff; display: grid; grid-auto-flow: column; align-content: center; justify-content: center; width: 27px; height: 27px; border-radius: 8px; font: 700 19px/1 monospace; }
.brand-icon span { font-size: 12px; align-self: end; padding-bottom: 2px; }
.site-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.site-status span { width: 7px; height: 7px; border-radius: 50%; background: #775be0; }
.hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 48px 20px 44px; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0; background: radial-gradient(ellipse at 50% 28%, #ece7ff, transparent 72%); }
.hero-art { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-art span { position: absolute; font-size: clamp(220px, 29vw, 440px); font-weight: 770; line-height: .9; color: #e2dcf9; opacity: .58; transform: rotate(-22deg); }
.hero-art span:nth-child(1) { top: -24%; left: -2%; }
.hero-art span:nth-child(2) { top: 12%; right: 3%; transform: rotate(25deg); }
.hero-art span:nth-child(3) { bottom: -47%; left: 11%; opacity: .33; }
.hero-inner { position: relative; }
.profile { display: inline-flex; text-align: left; align-items: center; gap: 11px; padding: 6px 16px 6px 6px; background: #ffffffbf; border: 1px solid #fff; border-radius: 50px; box-shadow: 0 6px 24px #36305c0a; }
.profile img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.profile strong, .profile span { display: block; }
.profile strong { font-size: 14px; }
.profile span { margin-top: 3px; color: var(--muted); font-size: 12px; }
h1 { margin: 22px 0 15px; font-weight: 750; font-size: clamp(56px, 8.1vw, 111px); line-height: .89; letter-spacing: -.082em; }
h1 span { color: #553aca; }
.hero p { margin: 20px auto 0; max-width: 390px; color: var(--muted); font-size: clamp(15px, 2vw, 17px); line-height: 1.48; text-wrap: pretty; }
.lab { position: relative; max-width: 1144px; padding: 0 28px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 18px; align-items: stretch; }
.controls, .terminal { border-radius: 24px; overflow: hidden; }
.controls { padding: 25px 27px; background: white; border: 1px solid #e8e5f1; box-shadow: 0 12px 28px #29234309; }
.controls h2 { font-size: 25px; line-height: 1.1; letter-spacing: -.055em; margin: 0 0 20px; }
.controls > label, legend { display: block; padding: 0; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.input-wrap { display: flex; gap: 9px; align-items: center; padding: 0 13px; height: 46px; border-radius: 11px; border: 1px solid #e5e1ef; background: #f8f7fb; color: #625c75; }
.input-wrap:focus-within { outline: 2px solid #7763ec; outline-offset: 1px; }
.input-wrap input { flex: 1; min-width: 0; padding: 0; background: transparent; border: 0; outline: none; color: #201e30; font-weight: 640; }
.currency { font-size: 11px; font-weight: 700; }
.error { font-size: 12px; color: #a51c41; margin: 7px 0 0; }
fieldset { min-width: 0; padding: 0; border: 0; margin: 16px 0 0; }
.segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 11px; background: #f0eef6; }
.segments label { position: relative; cursor: pointer; }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segments span { display: block; text-align: center; font-weight: 620; font-size: 13px; color: #514d66; padding: 9px 2px; border-radius: 8px; }
.segments input:checked + span { color: var(--accent); background: #fff; box-shadow: 0 1px 4px #302a501a; }
.segments input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.estimate { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.estimate output { color: var(--accent); font-size: clamp(18px, 2.4vw, 25px); font-weight: 740; letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#run { width: 100%; min-height: 46px; border: 0; border-radius: 12px; color: white; background: #4c36ce; font-size: 14px; font-weight: 690; transition: background .18s, transform .18s; }
#run span { font-size: 10px; padding-right: 6px; }
#run:hover:not(:disabled) { background: #3925af; }
#run:active:not(:disabled) { transform: scale(.985); }
#run:disabled { cursor: progress; background: #6555bc; }
.terminal { display: flex; flex-direction: column; background: #1b192b; color: #e3def6; border: 1px solid #2e2945; box-shadow: 0 14px 30px #231a4020; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.terminal-bar { height: 49px; padding: 0 17px; background: #252239; border-bottom: 1px solid #343049; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: 12px; color: #ddd6f1; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff7f86; }
.dots i:nth-child(2) { background: #f7c366; }
.dots i:nth-child(3) { background: #77d9a5; }
.offline { justify-self: end; font-size: 9px; letter-spacing: .09em; color: #b7acd4; background: #36304b; padding: 4px 6px; border-radius: 4px; }
.terminal-body { flex: 1; display: flex; flex-direction: column; padding: 19px 21px 13px; gap: 12px; }
#logs { font-size: 12px; line-height: 1.7; min-height: 149px; overflow-wrap: anywhere; }
.log-line { min-height: 21px; }
.muted { color: #c6b9eb; }
.dim { color: #aaa1bd; }
.prompt { color: #c3aaff; }
.success { color: #9ce9bb; }
.terminal-footer { min-height: 40px; padding: 6px 17px; display: flex; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid #343049; color: #b7acd4; font-size: 11px; }
#reset { border: 0; color: #e3d6ff; background: transparent; padding: 4px; text-decoration: underline; }
footer { color: var(--muted); max-width: 1144px; padding: 24px 25px 28px; margin: auto; text-align: center; font-size: 12px; line-height: 1.5; }
@media (max-width: 700px) {
  .bar-inner { padding: 0 17px; }
  .hero { padding-top: 37px; padding-bottom: 32px; }
  .hero-art span:nth-child(2) { right: -20%; }
  .hero-art span:nth-child(1) { left: -18%; }
  .lab { grid-template-columns: minmax(0, 1fr); padding: 0 16px; gap: 13px; max-width: 510px; }
  .controls { padding: 22px; }
  .terminal { min-height: 308px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.profile .profile-email { font-size: 11px; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; background: #201d32; border-bottom: 1px solid #343049; }
.phases li { min-width: 0; padding: 10px 3px; text-align: center; font-size: 11px; color: #aea5c8; border-bottom: 2px solid transparent; }
.phases li[data-state="current"] { border-color: #a991ff; color: #f0e8ff; background: #302747; }
.phases li[data-state="done"] { color: #9ce9bb; }
.phases li[data-state="done"]::before { content: "✓ "; }
.terminal-body { padding-bottom: 0; gap: 0; }
#logs { height: 218px; min-height: 0; overflow-y: auto; scrollbar-color: #625780 #1b192b; scrollbar-width: thin; padding: 1px 7px 8px 0; }
.log-time { color: #a398bd; padding-right: 9px; }
.log-warn { color: #f6ce89; }
.command-form { display: flex; align-items: center; gap: 9px; min-height: 44px; border-top: 1px solid #343049; color: #c3aaff; font-size: 12px; }
.command-form input { min-width: 0; flex: 1; padding: 8px 3px; color: #f0e8ff; border: 0; background: transparent; }
.command-form input::placeholder { color: #a79dbf; }
.command-form button, #pause, #reset { padding: 4px 7px; color: #e3d6ff; background: #36304b; border: 1px solid #504568; border-radius: 5px; text-decoration: none; }
.terminal-actions { display: flex; gap: 6px; }
.step-count { margin-left: auto; white-space: nowrap; }
.progress-track { height: 4px; background: #302a46; }
progress { display: block; width: 100%; height: 4px; border: 0; appearance: none; background: #302a46; color: #a991ff; }
progress::-webkit-progress-bar { background: #302a46; }
progress::-webkit-progress-value { background: #a991ff; transition: width .25s ease; }
progress::-moz-progress-bar { background: #a991ff; }
.terminal-review { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; padding: 11px; border-radius: 8px; background: #34294c; font-size: 11px; }
.terminal-review strong, .terminal-review div span { display: block; }
.terminal-review div span { margin-top: 4px; color: #d3c4f3; overflow-wrap: anywhere; }
#approve, #download { border: 0; border-radius: 9px; padding: 9px 12px; font-weight: 670; }
#approve { background: #ddcdff; color: #251b43; }
.controls { align-self: start; }
.report { margin: 18px auto 0; max-width: 1088px; width: calc(100% - 56px); padding: 25px 27px; background: #fff; border: 1px solid #e8e5f1; border-radius: 24px; box-shadow: 0 12px 28px #29234309; }
.report-header { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.report h2 { margin: 0; font-size: 25px; letter-spacing: -.055em; }
.report p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
#download { background: #eee9ff; color: #452eb1; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.stats div { border-radius: 12px; background: #f5f3fb; padding: 13px; }
.stats dt { color: var(--muted); font-size: 12px; }
.stats dd { margin: 6px 0 0; font-size: clamp(16px, 2.5vw, 24px); font-weight: 730; letter-spacing: -.04em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stats div:nth-child(2) dd { color: var(--accent); }
.report summary { color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 670; }
.report ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 700px) {
  .report { width: calc(100% - 32px); max-width: 478px; padding: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terminal-bar { padding-inline: 12px; }
  .terminal-body { padding-inline: 14px; }
  .terminal-footer { padding-inline: 12px; flex-wrap: wrap; }
}

.phases { grid-template-columns: repeat(5, 1fr); }
.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; background: #383249; border-bottom: 1px solid #383249; }
.telemetry div { min-width: 0; background: #211e32; padding: 10px 8px 11px; text-align: center; }
.telemetry dt { color: #b8adce; font-size: 10px; line-height: 1.3; }
.telemetry dd { color: #e9dfff; font-size: 13px; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
#logs { height: 260px; }
.hero { padding-top: 37px; padding-bottom: 32px; }
h1 { font-size: clamp(49px, 7.2vw, 90px); }
@media (max-width: 350px) {
  h1 { font-size: 42px; }
  .phases li { font-size: 9px; }
  .telemetry div { padding-inline: 3px; }
}

#run .command-chevron {
  display: inline-block;
  font: 700 13px/1 ui-monospace, monospace;
  padding-right: 7px;
}

/* Shared surfaces and motion */
:root {
  background: #f6f4fb;
  --accent: #5334c5;
  --ease-out: cubic-bezier(.18, .7, .27, 1);
}

body {
  background: radial-gradient(ellipse at 50% 8%, #f0eaff 0, transparent 44rem), #f6f4fb;
}

.topbar {
  position: relative;
  z-index: 2;
  background: #ffffffa8;
  backdrop-filter: blur(18px);
}
.bar-inner { min-height: 64px; }
.brand-icon { background: linear-gradient(145deg, #4a3678, #1d1531); box-shadow: 0 4px 10px #3724572e; }
.site-status { border: 1px solid #e7e0f4; background: #fbf9ff; border-radius: 100px; padding: 6px 9px; }
.site-status span { box-shadow: 0 0 0 3px #775be01c; }

.hero { padding: 53px 20px 42px; }
.hero::before {
  background:
    radial-gradient(ellipse at 22% 12%, #dcd6ffb8, transparent 54%),
    radial-gradient(ellipse at 79% 34%, #f9d9ef9c, transparent 45%);
  mask-image: linear-gradient(#000 62%, transparent);
}
.hero-art span {
  position: absolute;
  display: block;
  width: clamp(145px, 21vw, 345px);
  aspect-ratio: .64;
  border-radius: 50%;
  border: clamp(15px, 2.6vw, 39px) solid #fff7;
  background: linear-gradient(155deg, #f5edff73, #a9a0f547 54%, #ffe5f582) border-box;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  box-shadow: 0 0 54px #b293ff33;
  opacity: .8;
  rotate: var(--angle);
  transform: none;
  animation: orbit-drift 10s ease-in-out infinite alternate;
}
.hero-art span:nth-child(1) { --angle: -31deg; top: -17%; left: 6%; }
.hero-art span:nth-child(2) { --angle: 36deg; top: -15%; right: 7%; transform: none; animation-delay: -4s; }
.hero-art span:nth-child(3) { --angle: 56deg; bottom: -81%; left: 36%; opacity: .38; animation-delay: -7s; }
.profile {
  max-width: 100%;
  padding: 7px 15px 7px 7px;
  border-radius: 22px;
  gap: 11px;
  background: #ffffffb8;
  box-shadow: 0 8px 30px #4c32721a, inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
  animation: enter .58s var(--ease-out) both;
}
.profile img { flex: none; width: 48px; height: 48px; border: 2px solid #fff; box-shadow: 0 1px 7px #39285433; }
.profile > div { min-width: 0; }
.profile .profile-email { overflow-wrap: anywhere; }
h1 {
  margin: 22px 0 0;
  font-size: clamp(49px, 7.1vw, 103px);
  line-height: .94;
  animation: enter .72s .07s var(--ease-out) both;
}
h1 span {
  color: transparent;
  background: linear-gradient(110deg, #4c26bc, #7b43d8 35%, #a0399e 55%, #5134c4 83%);
  background-size: 165% 100%;
  background-clip: text;
  animation: gradient-drift 7s ease-in-out infinite alternate;
}
.hero p { margin-top: 15px; animation: enter .72s .14s var(--ease-out) both; }

.lab { gap: 20px; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.controls, .terminal, .report { border-radius: 28px; }
.controls, .report {
  background: linear-gradient(155deg, #fff 65%, #fbf8ff);
  border-color: #ebe3f6;
  box-shadow: 0 16px 45px #33225712, inset 0 1px 0 #fff;
}
.controls { padding: 26px; animation: enter .7s .19s var(--ease-out) both; }
.controls h2, .report h2 { font-size: 27px; }
.input-wrap {
  height: 53px;
  border-radius: 14px;
  background: #f8f5fc;
  transition: background .22s, border-color .22s, box-shadow .22s;
}
.input-wrap:focus-within { background: #fff; border-color: #956fed; outline: none; box-shadow: 0 0 0 3px #956fed36; }
.input-wrap input { font-size: 17px; }
.segments { border-radius: 14px; background: #f0ebf8; }
.segments span { min-height: 44px; display: grid; place-items: center; border-radius: 11px; transition: background .24s, color .24s, box-shadow .24s, scale .2s; }
.segments label:active span { scale: .94; }
.segments input:checked + span { box-shadow: 0 3px 11px #4a2b7b24; }
.estimate {
  display: grid;
  gap: 4px;
  margin: 17px 0 14px;
  padding: 13px 15px;
  border: 1px solid #e9dffa;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5eeff, #fcf4fb);
}
.estimate output { font-size: clamp(27px, 3.1vw, 40px); line-height: 1.08; }
#run {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(115deg, #5632ca, #703ad1 65%, #9347c4);
  box-shadow: 0 7px 17px #6738ce43, inset 0 1px 0 #ffffff3d;
  transition: transform .22s var(--ease-out), box-shadow .22s, filter .22s;
}
#run:hover:not(:disabled) { background: linear-gradient(115deg, #5632ca, #703ad1 65%, #9347c4); filter: brightness(1.08); box-shadow: 0 9px 20px #6738ce59; }
#run:active:not(:disabled) { transform: scale(.975); }
#run:disabled { box-shadow: none; background: #64518e; }
#run:disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, #d5c2ff42 48%, transparent 70%);
  animation: sweep 2.5s linear infinite;
}

.terminal {
  min-width: 0;
  background: radial-gradient(ellipse at 100% 0, #2d2143, transparent 55%), #191625;
  border-color: #3d3056;
  box-shadow: 0 18px 45px #25193935, inset 0 1px 0 #ffffff20;
  scroll-margin-top: 12px;
  animation: enter .74s .27s var(--ease-out) both;
}
.terminal-bar { height: 52px; background: #2a2339; }
.offline { display: inline-flex; align-items: center; gap: 5px; border-radius: 100px; padding: 5px 7px; white-space: nowrap; }
.offline i { width: 5px; height: 5px; border-radius: 50%; background: #99e4ba; }
.controls:has(#run:disabled) + .terminal .offline i { animation: signal 1.7s ease-out infinite; }
.phases li { transition: background .3s, color .3s, border-color .3s; }
.telemetry div { padding-block: 11px; }
.telemetry dd { color: #f0e4ff; }
#logs { height: clamp(230px, 31vh, 320px); scrollbar-gutter: stable; }
.log-line:last-child { animation: log-in .32s var(--ease-out) both; }
.command-form button, #pause, #reset { min-height: 38px; min-width: 42px; border-radius: 9px; }
.command-form input { min-height: 44px; }
.terminal-review { border: 1px solid #624c89; border-radius: 13px; padding: 12px; animation: enter .38s var(--ease-out) both; }
#approve, #download { min-height: 44px; }
.progress-track, progress { height: 5px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #9f79fd, #eaa1ee); }
progress::-moz-progress-bar { background: linear-gradient(90deg, #9f79fd, #eaa1ee); }
.terminal-footer { min-height: 50px; }
.report { margin-top: 22px; animation: enter .55s var(--ease-out) both; }
.stats div { border: 1px solid #eee6f6; border-radius: 16px; background: #f8f5fc; }
.stats div:nth-child(2) { background: linear-gradient(140deg, #eee2ff, #f9eefa); border-color: #e5d6f7; }
.report summary { min-height: 44px; align-content: center; }
footer { text-wrap: balance; }

@keyframes enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbit-drift {
  from { translate: 0 0; scale: 1; }
  to { translate: 14px 20px; scale: 1.08; }
}
@keyframes gradient-drift { to { background-position: 100% 50%; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes signal { from { box-shadow: 0 0 0 0 #99e4ba99; } to { box-shadow: 0 0 0 5px #99e4ba00; } }
@keyframes log-in { from { opacity: .45; } to { opacity: 1; } }

@media (max-width: 720px) {
  .bar-inner { padding-inline: 14px; min-height: 57px; gap: 8px; }
  .brand { font-size: clamp(12px, 3.5vw, 15px); gap: 7px; }
  .brand-icon { width: 25px; height: 25px; }
  .site-status { gap: 5px; font-size: clamp(9px, 2.6vw, 11px); }
  .site-status span { width: 5px; height: 5px; }
  .hero { padding: 26px 15px 24px; }
  .hero-art span:nth-child(1) { left: -15%; top: -15%; }
  .hero-art span:nth-child(2) { right: -12%; top: -5%; }
  .hero-art span:nth-child(3) { bottom: -52%; }
  .profile { padding: 6px 12px 6px 6px; }
  .profile img { width: 42px; height: 42px; }
  h1 { margin-top: 19px; font-size: clamp(37px, 12vw, 70px); line-height: .96; letter-spacing: -.073em; }
  .hero p { margin-top: 12px; font-size: 14px; max-width: 320px; }
  .lab { grid-template-columns: minmax(0, 1fr); padding-inline: 12px; gap: 14px; max-width: 540px; }
  .controls, .terminal, .report { border-radius: 22px; }
  .controls { padding: 18px; }
  .controls h2, .report h2 { font-size: 24px; }
  .controls h2 { margin-bottom: 14px; }
  .controls fieldset { margin-top: 12px; }
  .input-wrap { height: 48px; }
  .estimate { margin-top: 12px; padding: 10px 12px; }
  .terminal-body { padding: 12px 12px 0; }
  .terminal-bar { height: 46px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; }
  .terminal-bar > span:nth-child(2) { text-align: center; white-space: nowrap; font-size: clamp(10px, 3vw, 12px); }
  .phases li { padding: 9px 1px; font-size: clamp(8px, 2.65vw, 11px); }
  .telemetry dt { display: grid; place-items: center; min-height: 2.6em; font-size: clamp(8px, 2.55vw, 10px); }
  .telemetry div { padding-inline: 3px; }
  .telemetry dd { font-size: clamp(10px, 3.1vw, 13px); }
  #logs { height: clamp(184px, 29svh, 265px); font-size: 11px; }
  .command-form input { font-size: 16px; }
  .command-form input::placeholder { font-size: 12px; }
  .terminal-footer { gap: 5px; font-size: 10px; }
  #pause, #reset, .command-form button { min-height: 44px; min-width: 44px; }
  .report { width: calc(100% - 24px); max-width: 516px; padding: 17px; }
  .stats { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div { padding: 10px; }
  .stats dd { font-size: clamp(15px, 5vw, 23px); }
  footer { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
}
