:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F3F5F7;
  --border: #E4E7EB;
  --border-strong: #CBD0D7;
  --ink: #1A1A1A;
  --ink-muted: #4A4A4A;
  --ink-faint: #767F8C;
  --accent: #0065CC;
  --accent-strong: #00509E;
  --accent-tint: #E8F1FC;
  --accent-ink: #FFFFFF;
  --success: #1B7F4C;
  --success-tint: #E4F5EA;
  --warning: #8A5A12;
  --warning-tint: #FBF3E6;
  --danger: #B3261E;
  --danger-tint: #FBE9E7;
  --env-bg: #122A4D;
  --env-ink: #EAF1FF;
  --radius: 8px;
  --radius-input: 6px;
  --radius-pill: 999px;
  --font-display: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151C;
    --surface: #161C25;
    --surface-2: #1F2731;
    --border: #2A3340;
    --border-strong: #3B4656;
    --ink: #EDF1F5;
    --ink-muted: #AEB8C4;
    --ink-faint: #7C8899;
    --accent: #5B9DF2;
    --accent-strong: #86B7F6;
    --accent-tint: #16233A;
    --accent-ink: #0B1730;
    --success: #5FC894;
    --success-tint: #16301F;
    --warning: #E3B24E;
    --warning-tint: #362A10;
    --danger: #E5847A;
    --danger-tint: #3A1C18;
  }
}

* {
  box-sizing: border-box;
}

/* Always reserve the vertical scrollbar's track, whether or not the current page/tab actually needs to
   scroll. Without this, toggling between panels of different heights (e.g. admin.html's tabs) shows or
   hides the scrollbar, which changes the viewport's available width and shifts every centered, max-width
   container left or right by the scrollbar's width. */
html {
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
}

/* Header */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #F2994A 0%, #EB5757 28%, #9B51E0 62%, #2F80ED 100%);
}

.topbar-main {
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}

.brand-badge svg {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}

.brand-name-accent {
  color: #FF6B4A;
}

.vendor-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.dryrun-strip {
  margin: 0;
  padding: 9px 32px;
  background: var(--env-bg);
  color: var(--env-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

/* Stepper */

.stepper {
  max-width: 640px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.stepper-list {
  display: flex;
  align-items: center;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.stepper-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink-faint);
  border: 1px solid var(--border-strong);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.stepper-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}

.stepper-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border-strong);
  margin: 0 8px;
  margin-bottom: 20px;
}

.stepper-item.is-active .stepper-dot {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.stepper-item.is-active .stepper-text {
  color: var(--ink);
}

.stepper-item.is-done .stepper-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.stepper-item.is-done .stepper-text {
  color: var(--ink-muted);
}

/* Wizard card */

.wizard-card {
  max-width: 640px;
  margin: 24px auto 64px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stage-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}

.stage-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--ink-muted);
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

input:not([type="radio"]):not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.field-readonly input {
  background: var(--surface-2);
  color: var(--ink-muted);
}

/* Prefill-from-Workday search block (stage 1) */

.prefill-block {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.prefill-mode-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.prefill-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.prefill-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
}

.prefill-panel {
  margin-top: 10px;
}

.prefill-panel > * + * {
  margin-top: 6px;
}

.prefill-detail-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prefill-detail-row input {
  flex: 1;
  min-width: 120px;
}

.prefill-status {
  white-space: pre-line;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 400;
}

.form-error {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 11px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

/* Review stage */

.review-group {
  margin-bottom: 24px;
}

.review-heading {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.review-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.review-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  font-size: 14px;
}

.review-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.review-label {
  color: var(--ink-muted);
  font-weight: 600;
  flex: 0 0 auto;
}

.review-value {
  color: var(--ink);
  font-weight: 400;
  text-align: right;
  word-break: break-word;
}

/* Results / confirmation view */

.dryrun-banner-alt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: var(--warning-tint);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  color: var(--warning);
}

.dryrun-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--warning);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

.dryrun-banner-alt strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
}

#results-summary {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.step-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.step-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.status-pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--success-tint);
  color: var(--success);
}

.status-pill-warning {
  background: var(--warning-tint);
  color: var(--warning);
}

.status-pill-danger {
  background: var(--danger-tint);
  color: var(--danger);
}

.step-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.xml-block {
  background: var(--surface-2);
  color: var(--ink);
  padding: 14px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

@media (max-width: 640px) {
  .wizard-card {
    margin: 16px 12px 48px;
    padding: 24px;
  }

  .stepper-text {
    display: none;
  }
}

/* ============================================================
   Home page
   ============================================================ */

.home-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-nav-link:hover {
  color: var(--accent);
}

.home {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 88px 0 72px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-sub {
  max-width: 46ch;
  margin: 0 0 30px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 101, 204, 0.08), 0 14px 26px -10px rgba(0, 101, 204, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hero-cta:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 101, 204, 0.1), 0 18px 30px -10px rgba(0, 101, 204, 0.5);
}

.hero-cta svg {
  transition: transform 0.15s ease;
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

.hero-meta {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-tint) 0%, rgba(232, 241, 252, 0) 70%);
  z-index: 0;
}

.preview-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 28px 56px -24px rgba(15, 23, 42, 0.28);
}

.preview-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.preview-sub {
  margin: 0 0 20px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-faint);
}

.preview-field {
  margin-bottom: 14px;
}

.preview-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.preview-input {
  height: 30px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.preview-input.is-filled {
  position: relative;
  background: var(--surface-2);
}

.preview-input.is-filled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 55%;
  height: 8px;
  border-radius: 3px;
  background: var(--border-strong);
  transform: translateY(-50%);
}

.preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
}

.how {
  padding: 8px 0 56px;
  border-top: 1px solid var(--border);
}

.how-title {
  margin: 44px 0 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-align: center;
}

.how-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.how-grid::before {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.how-step {
  position: relative;
  z-index: 1;
}

.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

.how-step h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.how-step p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.dryrun-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 72px;
  padding: 18px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dryrun-callout-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

.dryrun-callout strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink);
}

.dryrun-callout p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  font-size: 12px;
  color: var(--ink-faint);
  border-top: 1px solid var(--border);
}

.home-footer a {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-footer a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .hero-sub,
  .hero-copy .hero-actions {
    animation: fadeUp 0.5s ease both;
  }

  .hero-copy h1 { animation-delay: 0.05s; }
  .hero-copy .hero-sub { animation-delay: 0.1s; }
  .hero-copy .hero-actions { animation-delay: 0.15s; }
  .hero-visual { animation: fadeUp 0.6s ease 0.1s both; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 56px 0 48px;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .hero h1 {
    font-size: 30px;
  }

  .how-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 28px;
  }

  .how-grid::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .how-grid {
    grid-template-columns: 1fr;
  }

  .home-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
