:root {
  --paper: #f7f6f9;
  --surface: #ffffff;
  --ink: #17121f;
  --ink-2: #4a4357;
  --rule: #e3dfe9;
  --accent: #860be5;
  --accent-ink: #5b0a9c;
  --accent-wash: #f3eafd;
  --ok: #17784a;
  --warn: #9a5b00;
  --err: #b42318;
  --radius: 10px;
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-size: 17px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--rule); background: var(--surface); }
.brand { font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand::after { content: "."; color: var(--accent); }
.savestate { font-size: 14px; color: var(--ink-2); }
.savestate.err { color: var(--err); }

.shell { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(20px, 4vw, 48px);
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.loading, .fatal { grid-column: 1 / -1; color: var(--ink-2); }
.fatal { color: var(--err); font-size: 18px; max-width: 60ch; }

/* left rail */
.rail { position: sticky; top: 24px; }
.rail h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.02em; }
.rail .who { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.barlabel { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.steps li { border-bottom: 1px solid var(--rule); }
.steps button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 10px; align-items: center;
  padding: 11px 4px; cursor: pointer; font-size: 15.5px; color: var(--ink-2); }
.steps button:focus-visible { outline: 3px solid var(--accent); }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); flex: none;
  display: grid; place-items: center; font-size: 11px; color: #fff; }
.steps .done .dot { background: var(--ok); border-color: var(--ok); }
.steps .done .dot::after { content: "✓"; }
.steps .cur button { color: var(--ink); font-weight: 600; }
.steps .cur .dot { border-color: var(--accent); }

/* main form */
.panel h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.02em; }
.panel .intro { color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }
.q { margin: 0 0 26px; max-width: 640px; }
.q > label, .q > .lab { display: block; font-weight: 600; margin-bottom: 6px; }
.q .req { color: var(--accent-ink); margin-left: 2px; }
.q .help { font-size: 15px; color: var(--ink-2); margin: -2px 0 8px; max-width: 62ch; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=password], textarea {
  width: 100%; font: inherit; font-size: 16.5px; color: var(--ink); background: var(--surface);
  border: 1px solid #cfc8da; border-radius: 8px; padding: 11px 13px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #cfc8da; border-radius: 8px;
  background: var(--surface); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.opt input { margin-top: 5px; accent-color: var(--accent); }
.opts.cols { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.info { background: var(--accent-wash); border-radius: var(--radius); padding: 16px 18px; max-width: 640px; margin: 0 0 26px; }

/* login block */
.login { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; max-width: 640px; margin: 0 0 26px; }
.login h3 { margin: 0 0 4px; font-size: 18px; }
.login .help { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; }
.login .grid { display: grid; gap: 14px; }
.login .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.login label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.login .opt { font-weight: 400; font-size: 16px; margin: 0; }
.pw { position: relative; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.saved { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ok); font-weight: 600; }
.saved span { color: var(--ink-2); font-weight: 400; }

.btn { font: inherit; font-weight: 600; font-size: 16px; border: 0; border-radius: 8px; padding: 12px 20px; cursor: pointer;
  background: var(--ink); color: #fff; }
.btn:hover { background: #000; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }
.btn[disabled] { opacity: .55; cursor: progress; }
.link { all: unset; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.link:focus-visible { outline: 3px solid var(--accent); }
.nav { display: flex; gap: 18px; align-items: center; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 640px; }
.msg { margin: 10px 0 0; font-size: 15px; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.files { margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-2); }

.review dl { margin: 0 0 24px; max-width: 640px; }
.review dt { font-weight: 600; margin-top: 14px; }
.review dd { margin: 2px 0 0; color: var(--ink-2); }
.review .missing { color: var(--warn); }
.done-note { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; max-width: 640px; }

.foot { padding: 22px clamp(20px, 4vw, 48px); font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--rule); }
.foot p { max-width: 1100px; margin: 0 auto; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; }
  .steps { display: none; }
  .login .row2 { grid-template-columns: 1fr; }
}
