  body { background: var(--sand-50); }

  .wrap { max-width: 1240px; margin: 0 auto; padding: 32px 32px 80px; display: grid; grid-template-columns: 300px 1fr 340px; gap: 28px; }
  @media (max-width: 1080px) { .wrap { grid-template-columns: 1fr; } .aside { display: none; } }

  /* Stepper rail */
  .rail { position: sticky; top: 100px; height: fit-content; padding: 28px; border-radius: var(--r-2xl); background: linear-gradient(165deg, #182330, #0a0f14); color: #fff; overflow: hidden; position: sticky; }
  .rail::before { content: ''; position: absolute; top: -80px; right: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,178,74,0.3), transparent 65%); }
  .rail > * { position: relative; }
  .rail .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-300); }
  .rail h2 { font-family: var(--font-display); font-size: 26px; font-style: italic; font-weight: 500; letter-spacing: -0.01em; margin: 6px 0 24px; }
  .step {
    display: flex; gap: 14px; padding: 10px 0;
    position: relative;
  }
  .step + .step { border-top: 1px dashed rgba(255,255,255,0.08); }
  .step .mark {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 12px;
    color: var(--ink-300); flex-shrink: 0;
    font-weight: 600;
  }
  .step.done .mark { background: var(--grad-lagoon); border-color: transparent; color: #fff; }
  .step.on .mark { background: var(--grad-sunset); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px rgba(238,90,48,0.2); }
  .step .txt .t { font-size: 14px; font-weight: 600; }
  .step.on .txt .t { color: #fff; }
  .step .txt .s { font-size: 12px; color: var(--ink-300); margin-top: 2px; line-height: 1.4; }
  .step:not(.on):not(.done) .txt .t { color: rgba(255,255,255,0.7); }

  .time-card { margin-top: 22px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: var(--ink-300); line-height: 1.5; }
  .time-card b { color: #fff; font-weight: 600; }

  /* Main form card */
  .form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl); overflow: hidden; }
  .form-hd {
    padding: 32px 36px 26px;
    background:
      radial-gradient(ellipse 300px 180px at 100% 0%, rgba(255,178,74,0.3), transparent 60%),
      linear-gradient(160deg, #faf6ee, #f4ecd8);
    border-bottom: 1px solid var(--line);
  }
  .form-hd .eyebrow { color: var(--coral-600); }
  .form-hd h1 { font-size: 38px; font-weight: 400; letter-spacing: -0.02em; margin-top: 8px; line-height: 1.05; }
  .form-hd h1 em { font-style: italic; color: var(--coral-500); }
  .form-hd .sub { color: var(--fg-soft); font-size: 14px; margin-top: 8px; max-width: 520px; line-height: 1.55; }

  .form-body { padding: 36px; }

  .section-lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
  .section-lbl::before { content: ''; width: 20px; height: 2px; background: var(--coral-500); }

  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
  @media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }

  .fld { display: flex; flex-direction: column; gap: 6px; }
  .fld.full { grid-column: 1 / -1; }
  .fld label { font-size: 12px; font-weight: 600; color: var(--fg); }
  .fld input, .fld select, .fld textarea {
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
  }
  .fld input:focus, .fld select:focus, .fld textarea:focus {
    outline: none;
    border-color: var(--coral-500);
    box-shadow: 0 0 0 3px rgba(238,90,48,0.15);
  }
  .fld .hint { font-size: 11px; color: var(--muted); line-height: 1.4; }

  .phone-wrap { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }

  /* Document uploads */
  .docs-list { display: grid; gap: 12px; margin-bottom: 26px; }
  .doc {
    padding: 18px 20px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--line);
    background: #fff;
    display: flex; align-items: center; gap: 16px;
    transition: all .15s;
  }
  .doc:hover { border-color: var(--coral-500); background: var(--sand-50); }
  .doc.uploaded { border-color: var(--lagoon-500); background: rgba(11,184,173,0.04); }
  .doc .ic {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--sand-100);
    display: grid; place-items: center; color: var(--fg);
    flex-shrink: 0;
  }
  .doc.uploaded .ic { background: var(--grad-lagoon); color: #fff; }
  .doc .bd { flex: 1; min-width: 0; }
  .doc .nm { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
  .doc .nm .req { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(238,90,48,0.12); color: var(--coral-600); letter-spacing: 0.04em; text-transform: uppercase; }
  .doc .nm .opt { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--sand-100); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
  .doc .hint { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
  .doc .act { flex-shrink: 0; padding: 9px 14px; border-radius: var(--r-pill); background: var(--basalt-950); color: #fff; font-size: 12px; font-weight: 600; }
  .doc.uploaded .act { background: rgba(11,184,173,0.15); color: var(--lagoon-600); }

  /* Package choice */
  .pkg-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
  @media (max-width: 640px) { .pkg-choice { grid-template-columns: 1fr; } }
  .pkg-op {
    padding: 20px; border-radius: var(--r-md);
    border: 1.5px solid var(--line);
    cursor: pointer; position: relative;
    transition: all .15s;
  }
  .pkg-op:hover { border-color: var(--coral-500); }
  .pkg-op.on { border-color: var(--coral-500); background: linear-gradient(180deg, #fff, #faf6ee); box-shadow: 0 14px 30px rgba(238,90,48,0.15); }
  .pkg-op.on::after { content: '✓'; position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad-sunset); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
  .pkg-op .nm { font-family: var(--font-display); font-style: italic; font-size: 22px; font-weight: 500; }
  .pkg-op .pr { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin-top: 6px; }
  .pkg-op .pr .m { font-size: 12px; color: var(--muted); font-family: var(--font-sans); font-weight: 400; font-style: normal; }
  .pkg-op .li { font-size: 12px; color: var(--fg-soft); margin-top: 8px; line-height: 1.5; }

  /* Consent block */
  .consent { padding: 18px; background: var(--sand-50); border-radius: var(--r-md); margin-bottom: 26px; display: flex; gap: 12px; align-items: flex-start; }
  .consent input { margin-top: 3px; accent-color: var(--coral-500); width: 18px; height: 18px; }
  .consent label { font-size: 13px; color: var(--fg-soft); line-height: 1.5; }
  .consent a { color: var(--coral-600); text-decoration: underline; }

  .cta-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 20px; padding-top: 26px; border-top: 1px solid var(--line); }
  .cta-row .save { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
  .cta-row .save::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--lagoon-500); }
  .cta-row .btns { display: flex; gap: 10px; }

  /* Aside */
  .aside { display: grid; gap: 16px; height: fit-content; position: sticky; top: 100px; }
  .aside-card { padding: 22px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
  .aside-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 4px; }
  .aside-card h4 em { font-style: italic; color: var(--lagoon-600); }
  .aside-card p { font-size: 13px; color: var(--fg-soft); line-height: 1.55; margin-bottom: 10px; }

  .earn-bar { height: 8px; background: var(--sand-100); border-radius: 999px; margin: 10px 0 8px; overflow: hidden; }
  .earn-bar .f { height: 100%; width: 72%; background: var(--grad-sunset); border-radius: 999px; }

  .testi-card { padding: 24px; border-radius: var(--r-lg); background: linear-gradient(165deg, #0bb8ad, #0a4843); color: #fff; position: relative; overflow: hidden; }
  .testi-card::before { content: '"'; position: absolute; top: -40px; left: 12px; font-family: var(--font-display); font-size: 180px; color: rgba(255,255,255,0.1); font-style: italic; line-height: 1; }
  .testi-card .quote { font-family: var(--font-display); font-size: 18px; font-style: italic; line-height: 1.35; font-weight: 400; position: relative; }
  .testi-card .who { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 10px; position: relative; }
  .testi-card .who .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(145deg, #ffc0a0, #ee5a30); }

  .help-card { padding: 18px; border-radius: var(--r-md); background: var(--sand-100); display: flex; gap: 12px; align-items: center; }
  .help-card .ic { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
  .help-card .t { font-size: 13px; font-weight: 600; }
  .help-card .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ──────────────────────────────────────────────────────────────
 * Adapter rules for PHP template (semantic upgrades)
 * ────────────────────────────────────────────────────────────── */

/* Stepper rail uses an ordered list now */
.mr-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Required marker (P0 #5) */
.mr-required {
  color: var(--coral-600);
  margin-left: 2px;
  font-weight: 700;
}

/* Plate input — mono + uppercase */
.mr-plate {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Earnings bar scale (lifted from inline style) */
.earn-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Convert .help-card from <div> to <a> — preserve hover feel */
a.help-card {
  text-decoration: none;
  color: var(--fg);
  transition: background .15s, transform .15s;
}
a.help-card:hover { background: var(--sand-200); }
a.help-card:active { transform: scale(0.99); }

/* Package picker — radios are visually hidden, label does the work */
.pkg-op { position: relative; }
.pkg-op input[type="radio"] {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* Consent — required marker via :invalid feedback */
.consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 184, 173, 0.45);
}

/* ──────────────────────────────────────────────────────────────
 * Single-page signup layout — the form template dropped the
 * stepper rail + testimonial aside, but the base `.wrap` grid
 * still reserves 300px + 340px side columns. Without an override,
 * the form stays trapped in the middle 1fr track and leaves big
 * empty space on the right.
 *
 * `.wrap-narrow` collapses the grid to a single centered column
 * capped at 880px — readable line lengths for a 2-column field grid.
 * ────────────────────────────────────────────────────────────── */
.wrap.wrap-narrow {
  grid-template-columns: minmax(0, 880px);
  justify-content: center;
  gap: 0;
}
@media (max-width: 1080px) {
  .wrap.wrap-narrow { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap.wrap-narrow { padding: 20px 16px 60px; }
  .wrap.wrap-narrow .form-hd { padding: 24px 20px 20px; }
  .wrap.wrap-narrow .form-hd h1 { font-size: 28px; }
  .wrap.wrap-narrow .form-body { padding: 24px 20px; }
}

/* ──────────────────────────────────────────────────────────────
 * 2-step driver signup — step header + body show/hide.
 * Pattern mirrors page-book.css's stepper but namespaced under
 * `.ds-*` so the two never collide on a page that loads both.
 * ────────────────────────────────────────────────────────────── */
.ds-step-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.ds-step-dots { display: flex; gap: 6px; }
.ds-step-dots span {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong, #e5dcc6);
  transition: background .2s;
}
.ds-step-dots span.on   { background: var(--coral-500); }
.ds-step-dots span.done { background: var(--lagoon-500); }
.ds-step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ds-step-label [data-mr-step-title] {
  color: var(--fg);
  font-weight: 600;
}

.ds-step { display: none; }
.ds-step.active { display: block; animation: ds-fadein .25s ease; }
@keyframes ds-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* CTA row on step 1 only has one button (Continue) — push it right;
   step 2 has Back + Submit so its existing space-between still works. */
.ds-step[data-mr-step="1"] .cta-row {
  justify-content: flex-end;
}

/* Success banner shown after POST /drivers/register returns 200.
   Replaces the inline-style div the JS used to inject — class-based
   so DOM probes can target a stable selector. */
.mr-signup-success {
  margin: 28px 36px;
  padding: 32px 28px;
  border-radius: var(--r-lg, 18px);
  background:
    radial-gradient(ellipse at top right, rgba(44, 212, 196, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(11, 184, 173, 0.08), rgba(11, 184, 173, 0.04));
  border: 1px solid rgba(11, 184, 173, 0.2);
  text-align: center;
}
.mr-signup-success__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--lagoon-700, #0a4843);
}
.mr-signup-success__msg {
  margin: 0;
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.55;
  max-width: 480px;
  margin-inline: auto;
}
@media (max-width: 640px) {
  .mr-signup-success { margin: 20px; padding: 24px 20px; }
  .mr-signup-success__title { font-size: 22px; }
}
