:root {
  --green: #008f32;
  --green-dark: #007a2b;
  --ink: #1a1d20;
  --muted: #687078;
  --line: #dfe4e1;
  --surface: #fff;
  --background: #f3f6f4;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 10% 0, #e2f5e9, transparent 32rem), var(--background); color: var(--ink); }
button, input { font: inherit; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px max(20px, calc((100% - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.topbar img { display: block; width: 174px; }
.topbar span { color: var(--muted); font-size: 13px; font-weight: 700; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 34px auto 64px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; margin: 0 auto 28px; padding: 16px 12px; border: 1px solid #e8dfe4; border-radius: 8px; background: #fff; }
.steps > span { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 8px; color: #595959; font-size: 13px; font-weight: 700; line-height: 20px; white-space: nowrap; }
/* Connect only the numbered circles; labels remain on their own line. */
.steps > span:not(:last-child)::after { position: absolute; top: 16px; left: calc(50% + 25px); right: calc(-50% + 25px); height: 2px; background: #d6c9cf; content: ""; }
.steps b { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border: 2px solid #d6c9cf; border-radius: 50%; background: #fff; color: #595959; }
body .steps > span.is-current { color: #9c0e4d; }
body .steps > span.is-current b, body .steps > span.is-complete b { border-color: #9c0e4d; background: #9c0e4d; color: #fff; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 18px 50px rgba(19, 58, 34, .08); }
.state-card, .credentials-card { max-width: 720px; margin: 0 auto; padding: clamp(30px, 6vw, 62px); text-align: center; }
.state-card h1, .credentials-card h1, .contract-heading h1 { margin: 5px 0 12px; line-height: 1.15; }
.state-card p, .credentials-card > p, .contract-heading p { color: var(--muted); line-height: 1.6; }
.eyebrow { margin: 0; color: var(--green) !important; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.state-icon { display: grid; width: 72px; height: 72px; margin: 0 auto 22px; place-items: center; border-radius: 50%; font-size: 34px; font-weight: 900; }
.success-icon { background: #e8f7ed; color: var(--green); box-shadow: 0 0 0 11px #f2fbf5; }
.error-icon { background: #fff0ee; color: #b42318; box-shadow: 0 0 0 11px #fff7f6; }
.candidate-number { margin: 22px 0; padding: 14px; border-radius: 12px; background: #f3f8f5; }
.candidate-number strong { color: var(--green); }
.waiting-note { display: grid; gap: 4px; margin: 28px 0; padding: 17px; border: 1px solid #cde5d5; border-radius: 13px; background: #f3fbf6; text-align: left; }
.waiting-note span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--green); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-dark); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.secondary { border: 1px solid var(--line); background: #f2f5f3; color: var(--ink); }
.button.wide { width: 100%; }
.spinner { width: 38px; height: 38px; margin: 0 auto 20px; border: 4px solid #dce9e0; border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.contract-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.contract-heading p { margin: 0; }
.pdf-frame { display: grid; min-height: 70vh; place-items: center; align-content: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #dfe5e1; color: var(--muted); }
.pdf-frame iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.acceptance-card { max-width: 820px; margin: 24px auto 0; padding: clamp(24px, 4vw, 38px); }
.acceptance-card h2, .delivery-card h2 { margin-top: 0; }
.acceptance-card > p, .delivery-card p { color: var(--muted); line-height: 1.55; }
.acceptance-check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; margin: 24px 0; cursor: pointer; font-weight: 650; line-height: 1.5; }
.acceptance-check input { width: 21px; height: 21px; accent-color: var(--green); }
.form-error { padding: 11px 13px; border-radius: 10px; background: #fff0ee; color: #a3271d !important; font-size: 13px; font-weight: 700; }
.credential-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.credential-row span { color: var(--muted); font-size: 12px; font-weight: 700; }
.credential-row code { overflow-wrap: anywhere; font-size: 16px; font-weight: 800; }
.credential-row button, .delivery-card button { padding: 9px 12px; border: 0; border-radius: 8px; background: #eaf3ed; color: var(--green-dark); font-weight: 800; cursor: pointer; }
.work-button { width: 100%; margin-top: 28px; }
.delivery-card { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; text-align: left; }
.delivery-card div { display: flex; gap: 10px; }

@media (max-width: 700px) {
  .contract-heading { align-items: stretch; flex-direction: column; }
  .pdf-frame { min-height: 58vh; }
  .pdf-frame iframe { height: 65vh; }
  .credential-row { grid-template-columns: 1fr auto; }
  .credential-row span { grid-column: 1 / -1; }
  .delivery-card div { flex-direction: column; }
}