/* ===================================================================
   Elite Supplies Inc — Partner Signup Portal
   Single stylesheet. Matches main-site dark aesthetic.
   =================================================================== */

:root {
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --surface:      #161616;
  --surface-2:    #1d1d1d;
  --surface-3:    #232323;
  --border:       #2a2a2a;
  --border-soft:  #1f1f1f;
  --text:         #f5f5f5;
  --text-dim:     #a8a8a8;
  --text-mute:    #6e6e6e;
  --accent:       #ffffff;
  --accent-soft:  rgba(255,255,255,0.08);
  --danger:       #ff5b5b;
  --success:      #4ade80;
  --warn:         #fbbf24;

  --radius:       10px;
  --radius-lg:    14px;

  --shadow-sm:    0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:    0 6px 18px rgba(0,0,0,0.35);
  --shadow-lg:    0 16px 40px rgba(0,0,0,0.5);

  --container:    1080px;
}

/* ── Base reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Google Sans Flex', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, .landing-hero h1, .phase-header h2, .success-card h2 {
  font-family: 'Gloock', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.brand, .brand-name, .brand-mark { font-family: 'Google Sans Flex', system-ui, sans-serif; }
img, svg { display: block; max-width: 100%; }
a { color: var(--text); text-decoration: none; transition: opacity 0.18s; }
a:hover { opacity: 0.78; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { font-family: inherit; }

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10,10,10,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: 'Gloock', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  height: 40px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.topbar-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.topbar-back svg { flex-shrink: 0; }
@media (max-width: 600px) {
  .brand { font-size: 18px; }
  .topbar-back { font-size: 12px; }
}

/* ── Progress strip ───────────────────────────────────────── */
.progress-strip {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-2);
  position: sticky; top: 60px; z-index: 40;
}
.progress-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
}
.step-track {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 0; padding: 0;
  position: relative;
  counter-reset: step;
}
.step-track::before {
  content: '';
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-track li {
  position: relative;
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1;
}
.step-num {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  color: var(--text-mute);
  transition: all 0.25s;
}
.step-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
}
.step-track li.is-done .step-num {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.step-track li.is-done .step-num::before {
  content: '✓'; font-size: 13px;
}
.step-track li.is-done .step-num span,
.step-track li.is-done .step-num { color: var(--bg); }
.step-track li.is-done .step-label { color: var(--text-dim); }
.step-track li.is-current .step-num {
  background: var(--text); color: var(--bg); border-color: var(--text);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}
.step-track li.is-current .step-label { color: var(--text); }

@media (max-width: 600px) {
  .progress-strip { top: 56px; }
  .step-label { font-size: 10px; letter-spacing: 0.05em; }
  .step-num { width: 24px; height: 24px; font-size: 11px; }
  .step-track::before { top: 12px; }
}

/* ── Wizard / screen flow ─────────────────────────────────── */
.wizard {
  flex: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.screen {
  display: none;
  animation: screenIn 0.32s ease both;
}
.screen.is-active { display: block; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Landing screen ───────────────────────────────────────── */
.landing-hero { text-align: left; }
.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.landing-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.landing-hero h1 .accent { opacity: 0.7; }
.lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 0 32px;
}
.landing-cta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.landing-cta .btn-primary,
.landing-cta .btn-ghost {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.landing-meta {
  list-style: none; padding: 0; margin: 0 0 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.landing-meta li {
  background: var(--surface);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.landing-meta strong {
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
}
.landing-meta span {
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}
@media (max-width: 720px) {
  .landing-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .landing-meta { grid-template-columns: 1fr; }
}

.landing-phases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.phase-card:hover { border-color: #3a3a3a; transform: translateY(-1px); }
.phase-num {
  font-size: 11px; font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.phase-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 700;
}
.phase-card p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .landing-phases { grid-template-columns: 1fr; }
  .landing-cta    { grid-template-columns: 1fr; }
}

/* ── Phase header (shared) ────────────────────────────────── */
.phase-header { margin-bottom: 32px; }
.phase-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.phase-header h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.phase-header p {
  color: var(--text-dim);
  max-width: 680px;
  margin: 0;
  font-size: 15px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form { display: block; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.grid-span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .grid-span-2 { grid-column: auto; }
}

.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.field-label em {
  color: var(--danger);
  font-style: normal;
  margin-left: 2px;
}
.hint-inline { color: var(--text-mute); font-weight: 400; font-size: 12px; }
.field-hint {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 0;
  line-height: 1.45;
}
.field-error:empty { display: none; }

input[type="text"], input[type="email"], input[type="tel"],
select, textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
input:focus, select:focus, textarea:focus {
  border-color: #4a4a4a;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.55; }

/* Native <select> is hidden once enhanced into custom dropdown.
   The fallback styling below applies if JS fails to upgrade it. */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
select option {
  background: var(--surface);
  color: var(--text);
}

/* ── Custom Dropdown (themed replacement for <select>) ──── */
.dd {
  position: relative;
  width: 100%;
  font-family: inherit;
}
.dd-trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.dd-trigger:hover { border-color: #3a3a3a; }
.dd-trigger:focus,
.dd.is-open .dd-trigger {
  border-color: #4a4a4a;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.dd-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-value.is-placeholder { color: var(--text-mute); }
.dd-caret {
  width: 12px; height: 12px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.2s;
}
.dd.is-open .dd-caret { transform: rotate(180deg); color: var(--text); }

.dd-menu {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.3);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
  padding: 6px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.dd.is-open .dd-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dd-option {
  display: block;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.dd-option:hover,
.dd-option.is-active {
  background: var(--surface-3);
}
.dd-option.is-selected {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.dd-option.is-selected:hover { background: var(--text); opacity: 0.92; }

/* Scrollbar inside dropdown menu */
.dd-menu::-webkit-scrollbar { width: 8px; }
.dd-menu::-webkit-scrollbar-track { background: transparent; }
.dd-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.dd-menu::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* When wrapped, the original <select> is hidden but kept in the DOM
   so the form can still read its value. */
.dd + select.dd-source { display: none !important; }

.field.has-error input, .field.has-error select, .field.has-error textarea,
.field.has-error .dd-trigger {
  border-color: var(--danger);
}
.field.has-error .field-error { display: block; }

/* ── Fieldsets / check grids ──────────────────────────────── */
.field-group {
  border: none; padding: 0; margin: 0 0 22px;
}
.field-group legend {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.field-group legend em { color: var(--danger); font-style: normal; margin-left: 2px; }

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .check-grid { grid-template-columns: 1fr; } }
.check-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.check-card:hover { border-color: #3a3a3a; }
.check-card input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.check-card-body { display: flex; flex-direction: column; gap: 2px; }
.check-card-body strong { font-size: 14px; font-weight: 700; }
.check-card-body span { font-size: 12.5px; color: var(--text-dim); }
.check-card:has(input:checked) {
  border-color: var(--text);
  background: var(--surface-2);
}

.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  color: var(--text-dim);
  cursor: pointer;
}
.check-row:last-of-type { border-bottom: none; }
.check-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.check-row a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

input[type="checkbox"] {
  appearance: none;
  width: 16px; height: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}
input[type="checkbox"]:checked {
  background: var(--text); border-color: var(--text);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Callouts ─────────────────────────────────────────────── */
.callout {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 22px 0;
  border: 1px solid var(--border);
  background: var(--surface);
}
.callout strong { color: var(--text); font-weight: 700; }
.callout-warn  { border-left: 3px solid var(--warn); }
.callout-info  { border-left: 3px solid var(--text-dim); color: var(--text-dim); }
.callout-info strong { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: #4a4a4a; background: var(--surface); }

.btn-lg { padding: 14px 28px; font-size: 14.5px; }

.form-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
@media (max-width: 480px) {
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn-primary, .form-actions .btn-ghost { width: 100%; }
}

/* ── Phase 4 — uploads ────────────────────────────────────── */
.upload-list {
  display: flex; flex-direction: column; gap: 10px;
}
.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: border-color 0.2s, background 0.2s;
}
.upload-card.is-uploaded { border-color: rgba(74,222,128,0.4); background: var(--surface-2); }
.upload-card.is-error    { border-color: var(--danger); }
.upload-num {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--surface-3);
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  color: var(--text-dim);
}
.upload-card.is-uploaded .upload-num { background: var(--success); color: var(--bg); }
.upload-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.upload-title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.upload-badge {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--border);
}
.upload-badge.required { color: var(--text); }
.upload-badge.optional { color: var(--text-dim); }
.upload-desc {
  font-size: 12.5px; color: var(--text-dim); line-height: 1.5;
}
.upload-filename {
  font-size: 12px; color: var(--success);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.upload-action { display: flex; gap: 8px; align-items: center; }
.upload-btn {
  font-size: 12px; font-weight: 600;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.upload-btn:hover { border-color: #4a4a4a; background: var(--surface-2); }
.upload-btn.is-replace { color: var(--text-dim); }
.upload-card input[type="file"] { display: none; }

@media (max-width: 600px) {
  .upload-card { grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; }
  .upload-action { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ── Review screen ────────────────────────────────────────── */
.review-stack {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 28px;
}
.review-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.review-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.review-section-head h3 {
  font-size: 14px; font-weight: 700; margin: 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.review-edit {
  font-size: 12px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.review-edit:hover { border-color: #4a4a4a; color: var(--text); }
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}
@media (max-width: 600px) { .review-grid { grid-template-columns: 1fr; } }
.review-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-row dt {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-mute);
  margin: 0;
}
.review-row dd {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  word-break: break-word;
}
.review-row.full { grid-column: 1 / -1; }
.review-empty { color: var(--text-mute); font-style: italic; }
.review-doc-list {
  display: flex; flex-direction: column; gap: 8px;
}
.review-doc {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.review-doc:last-child { border-bottom: none; }
.review-doc-name { color: var(--text); }
.review-doc-meta { color: var(--success); font-size: 12px; font-weight: 600; }

/* ── Success screen ───────────────────────────────────────── */
.success-card {
  max-width: 640px;
  margin: 40px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
}
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  display: grid; place-items: center;
  background: var(--success);
  color: var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(74,222,128,0.12);
}
.success-card .eyebrow { margin: 0 auto 18px; }
.success-card h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.success-card .lead { margin: 0 auto 32px; }
.reference-box {
  display: inline-flex; flex-direction: column; gap: 4px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px 28px;
  margin-bottom: 36px;
}
.reference-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-mute);
}
.reference-id {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}
.success-next {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
}
.success-next h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 12px;
  font-weight: 700;
}
.success-next ol {
  margin: 0; padding-left: 18px;
  font-size: 13.5px; color: var(--text-dim); line-height: 1.7;
}
.success-next ol li::marker { color: var(--text-mute); font-weight: 700; }
.success-next a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* ── Bottom bar ───────────────────────────────────────────── */
.bottombar {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-2);
  margin-top: auto;
}
.bottombar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-size: 12px; color: var(--text-mute);
}
.bottombar-links { display: flex; gap: 18px; }
.bottombar-links a { color: var(--text-dim); }
@media (max-width: 600px) {
  .bottombar-inner { flex-direction: column; gap: 10px; text-align: center; }
}

/* ── Submitting overlay ───────────────────────────────────── */
[hidden] { display: none !important; }
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 1000;
}
.overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.overlay-card h3 { margin: 18px 0 6px; font-size: 18px; }
.overlay-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.spinner {
  width: 38px; height: 38px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast (lightweight error feedback) ───────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--surface);
  border: 1px solid var(--danger);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 48px);
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.is-success { border-color: var(--success); }
