:root {
  --ink: #1f2328; --muted: #6b7280; --line: #d6d9de;
  --done: #1a7f37; --action: #b45309; --action-bg: #fef3c7; --active: #1d4ed8; --active-bg: #dbeafe;
  --pending: #b8bdc4;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #f7f8fa; }
main { max-width: 860px; margin: 0 auto; padding: 48px 20px; }
h1 { font-size: 1.6rem; margin: 0 0 28px; }

form label { display: block; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; gap: 8px; max-width: 460px; }
input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus { outline: 2px solid var(--active); outline-offset: 1px; }
button { font: inherit; font-weight: 600; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
.error { color: #b91c1c; }

.who { font-size: 1.1rem; margin: 0 0 24px; }
.who strong { font-size: 1.4rem; letter-spacing: .05em; }

/* Stages: left to right, joined by a line; stacked on narrow screens. */
#stages { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 0; margin: 0; padding: 0; }
#stages li { position: relative; text-align: center; padding: 0 6px; }
#stages li:not(:first-child)::before {
  content: ""; position: absolute; top: 19px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0;
}
#stages li.done + li::before, #stages li.done:not(:first-child)::before { background: var(--done); }
#stages .dot { position: relative; z-index: 1; display: flex; margin: 0 auto 10px; }
.name { font-weight: 600; }
.detail { font-size: .9rem; color: var(--muted); }
li.action .detail { color: var(--action); font-weight: 600; }
li.active .detail { color: var(--active); }
li.pending .name { color: var(--muted); font-weight: 500; }

.dot {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; background: #fff; border: 3px solid var(--pending); color: #fff;
}
.dot.done { background: var(--done); border-color: var(--done); }
.dot.action { background: var(--action-bg); border-color: var(--action); color: var(--action); }
.dot.active { background: var(--active-bg); border-color: var(--active); }
.dot.active::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--active); }
.dot.pending { background: #f1f2f4; }

.meta { font-size: .9rem; color: var(--muted); margin-top: 32px; }

@media (max-width: 640px) {
  #stages { grid-template-columns: 1fr; gap: 18px; }
  #stages li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; text-align: left; padding: 0; }
  #stages .dot { grid-row: span 2; margin: 0; }
  #stages li:not(:first-child)::before { top: -18px; left: 18px; right: auto; width: 3px; height: 18px; }
}
