:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #171c26;
  --muted: #5d6676;
  --line: #dfe3ea;
  --accent: #2450c8;
  --accent-hover: #1b3fa3;
  --accent-ink: #ffffff;
  --accent-soft: #e9eefb;
  --ok: #16744a;
  --ok-soft: #e6f4ec;
  --bad: #b8322a;
  --bad-soft: #fbebe9;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a;
    --surface: #1b1f27;
    --ink: #e8eaee;
    --muted: #9ba4b3;
    --line: #2d333e;
    --accent: #6f95ff;
    --accent-hover: #8fadff;
    --accent-ink: #0d1220;
    --accent-soft: #1f2a47;
    --ok: #55c794;
    --ok-soft: #173326;
    --bad: #f27f74;
    --bad-soft: #3a1e1c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
main { max-width: 820px; margin: 0 auto; padding: 56px 20px 96px; }

h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance; }
h2 { font-size: 24px; letter-spacing: -0.01em; margin: 56px 0 18px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }

.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; margin-bottom: 26px; }

.btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--big { padding: 14px 28px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); border-color: var(--accent); }
.btn__meta { font-weight: 400; opacity: .8; font-size: 14px; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 12px 68px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); }

.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 8px 24px 24px; margin: 0 0 16px; min-width: 0; }
.panel legend { font-weight: 700; font-size: 18px; padding: 0 8px; margin-left: -8px; }
.hint { color: var(--muted); font-size: 14px; }
.field { margin-top: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 4px; }
.field__help { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.field__error { color: var(--bad); font-size: 14px; margin: 6px 0 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }

.result { margin-top: 10px; border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.result--ok { background: var(--ok-soft); }
.result--bad { background: var(--bad-soft); }
.result__title { font-weight: 600; margin: 0; }
.result--ok .result__title { color: var(--ok); }
.result--bad .result__title { color: var(--bad); }
.result ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.result li { padding-left: 22px; position: relative; overflow-wrap: anywhere; }
.result li::before { position: absolute; left: 0; font-weight: 700; }
.result li.ok::before { content: "✓"; color: var(--ok); }
.result li.bad::before { content: "✗"; color: var(--bad); }
.result li span { color: var(--muted); }

.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.status { margin: 0; color: var(--muted); font-size: 15px; }
.status--ok { color: var(--ok); font-weight: 600; }
.status--bad { color: var(--bad); font-weight: 600; }
.submit { margin-top: 24px; display: grid; gap: 10px; justify-items: start; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .btn { transition: none; } }

.done { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: var(--radius); padding: 28px; }
.done h2 { margin: 0 0 10px; color: var(--ok); }
.done:focus { outline: none; }

@media (max-width: 640px) {
  main { padding: 32px 16px 64px; }
  .grid3 { grid-template-columns: 1fr; }
  .panel { padding: 4px 16px 18px; }
  .steps li { padding: 62px 18px 8px 18px; }
  .steps li::before { left: 18px; top: 18px; }
  .btn--big { width: 100%; justify-content: center; }
}
