/* MigrateKit API Server Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;
  --ink-950: #0c0d0e;
  --ink-800: #2a2d31;
  --ink-600: #525861;
  --ink-400: #5d646f;
  --ink-300: #c4c8cd;
  --ink-200: #e1e3e6;
  --ink-100: #f0f1f2;
  --ink-50: #f8f9fa;
  --green-600: #0e6e40;
  --green-500: #159a59;
  --green-100: #d4f2e2;
  --green-50: #edfaf3;
  --red-700: #991b1b;
  --red-100: #fee2e2;
}

body { font-family: var(--font-sans); color: var(--ink-950); background: var(--ink-50); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--green-600); }
.center-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 24px; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
h3 { font-size: 0.875rem; font-weight: 700; margin: 20px 0 8px; color: var(--ink-600); text-transform: uppercase; letter-spacing: 0.05em; }
p { margin-bottom: 12px; }
.text-muted { color: var(--ink-600); font-size: 0.9375rem; }
code { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--ink-100); padding: 2px 6px; border-radius: 3px; }

/* Header */
.header { border-bottom: 1px solid var(--ink-200); background: #fff; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; color: var(--ink-950); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--ink-950); color: var(--green-500); border-radius: 3px; font-size: 10px; font-weight: 700; }
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav a { font-size: 0.875rem; color: var(--ink-600); text-decoration: none; font-weight: 500; }
.header-nav a:hover { color: var(--ink-950); }
.user-email { font-size: 0.8125rem; color: var(--ink-400); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; transition: background 0.15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink-950); color: #fff; }
.btn-primary:hover { background: var(--ink-800); color: #fff; }
.btn-outline { background: transparent; color: var(--ink-950); border: 1.5px solid var(--ink-300); }
.btn-outline:hover { background: var(--ink-50); border-color: var(--ink-400); }
.btn-danger { background: transparent; color: var(--red-700); border: 1px solid var(--red-100); }
.btn-danger:hover { background: var(--red-100); }
.btn-sm { font-size: 0.8125rem; padding: 4px 12px; }
.btn-lg { font-size: 1.0625rem; padding: 14px 28px; }

/* Hero */
.hero-section { padding: 80px 0 60px; border-bottom: 1px solid var(--ink-200); }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-500); margin-bottom: 16px; }
.hero-title { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 16px; }
.hero-sub { font-size: 1.125rem; color: var(--ink-600); max-width: 520px; margin-inline: auto; margin-bottom: 32px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Steps */
.section { padding: 60px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { border: 1px solid var(--ink-200); border-radius: 10px; background: #fff; padding: 24px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--ink-950); color: var(--green-500); border-radius: 6px; font-family: var(--font-mono); font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.step-card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink-950); }
.step-card p { color: var(--ink-600); font-size: 0.875rem; margin: 0; line-height: 1.6; }

/* Code blocks */
.code-block { background: var(--ink-950); border-radius: 8px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.code-block pre { font-family: var(--font-mono); font-size: 0.75rem; color: var(--green-100); margin: 0; white-space: pre; line-height: 1.6; }
.code-label { font-family: var(--font-mono); font-size: 0.6875rem; color: #9aa0aa; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.footer-note { font-size: 0.8125rem; color: var(--ink-400); text-align: center; margin-top: 32px; line-height: 1.7; }

/* Auth card */
.auth-card { background: #fff; border: 1px solid var(--ink-200); border-radius: 10px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); text-align: center; }
.auth-logo { margin-bottom: 16px; }
.auth-logo .logo-mark { width: 48px; height: 48px; font-size: 16px; }
.auth-sub { color: var(--ink-600); font-size: 0.9375rem; margin: 8px 0 24px; }
.auth-note { font-size: 0.75rem; color: var(--ink-400); margin-top: 20px; }

/* Cards */
.card { background: #fff; border: 1px solid var(--ink-200); border-radius: 10px; padding: 24px; }
.card h2 { margin-bottom: 16px; }

/* Alerts */
.alert { border-radius: 8px; padding: 16px; margin-bottom: 24px; font-size: 0.875rem; }
.alert-success { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-600); }
.key-display { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.key-display code { flex: 1; background: #fff; border: 1px solid var(--green-100); padding: 8px 12px; font-size: 0.8125rem; word-break: break-all; }

/* Key form */
.key-form { display: flex; gap: 12px; }
.key-form input { flex: 1; border: 1.5px solid var(--ink-200); border-radius: 6px; padding: 8px 12px; font-size: 0.875rem; }
.key-form input:focus { outline: none; border-color: var(--green-500); }
@media (max-width: 500px) { .key-form { flex-direction: column; } }

/* Key list */
.key-list { display: flex; flex-direction: column; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ink-100); }
.key-row:last-child { border-bottom: none; }
.key-preview { font-size: 0.75rem; color: var(--ink-400); margin-left: 8px; }
.key-meta { display: block; font-size: 0.75rem; color: var(--ink-400); margin-top: 2px; }
.key-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Endpoint badge */
.endpoint-badge { display: inline-block; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: var(--green-100); color: var(--green-600); margin-bottom: 8px; }

/* Param list */
.param-list { list-style: none; padding: 0; margin: 8px 0 16px; }
.param-list li { font-size: 0.875rem; color: var(--ink-600); padding: 4px 0; }
.required { color: var(--red-700); font-weight: 600; font-size: 0.75rem; }
.optional { color: var(--ink-400); font-size: 0.75rem; }

/* ==========================================================================
   Design system extensions
   --------------------------------------------------------------------------
   The base sheet covers the original auth/dashboard chrome. These add the
   pieces the guided migration flow needs: a journey rail, step cards, choice
   cards, the verification method picker, and the scorecard grid. Everything is
   built from the existing tokens so nothing drifts from the base palette.
   ========================================================================== */

:root {
  --shadow-sm: 0 1px 2px rgba(12,13,14,.06), 0 1px 3px rgba(12,13,14,.04);
  --shadow-md: 0 2px 4px rgba(12,13,14,.05), 0 8px 20px rgba(12,13,14,.07);
  --shadow-lg: 0 4px 8px rgba(12,13,14,.05), 0 16px 40px rgba(12,13,14,.10);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --amber-700: #8a6d3b; --amber-100: #fdf6e3;
  --page: 860px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 400px at 50% -200px, rgba(21,154,89,.06), transparent 70%),
    var(--ink-50);
  color: var(--ink-950);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { max-width: var(--page); margin: 0 auto; padding: var(--sp-10) var(--sp-6) var(--sp-12); }

/* --- Header ------------------------------------------------------------- */
.header {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ink-200);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: var(--sp-4); }
.logo { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 800; letter-spacing: -.01em; color: var(--ink-950); text-decoration: none; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--ink-950); color: var(--green-500);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
.header-nav { display: flex; align-items: center; gap: var(--sp-3); }
.user-email { font-size: 13px; color: var(--ink-600); }

/* --- Typography --------------------------------------------------------- */
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 0 0 var(--sp-2); }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; margin: 0 0 var(--sp-3); }
h3 { font-size: 15px; font-weight: 700; margin: 0 0 var(--sp-2); }
.lede { font-size: 16px; line-height: 1.6; color: var(--ink-600); margin: 0 0 var(--sp-6); max-width: 62ch; }
.text-muted { color: var(--ink-600); }
code, .mono { font-family: var(--font-mono); font-size: .92em; }

/* --- Cards -------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: var(--sp-5); }
.card-quiet { background: var(--ink-50); box-shadow: none; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r-md);
  border: 1px solid var(--ink-200); background: #fff; color: var(--ink-950);
  cursor: pointer; text-decoration: none; line-height: 1;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.btn-primary { background: var(--ink-950); color: #fff; border-color: var(--ink-950); }
.btn-primary:hover { background: var(--ink-800); }
.btn-accent { background: var(--green-500); border-color: var(--green-500); color: #fff; }
.btn-accent:hover { background: var(--green-600); border-color: var(--green-600); }
.btn-lg { font-size: 15px; padding: 13px 24px; border-radius: var(--r-md); }
.btn-sm { font-size: 12.5px; padding: 6px 12px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* --- Forms -------------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: var(--sp-2); }
input[type=text], input[type=url], input[type=email], input[type=password], select, textarea {
  width: 100%; font-family: var(--font-sans); font-size: 15px;
  padding: 11px 14px; border: 1px solid var(--ink-200); border-radius: var(--r-md);
  background: #fff; color: var(--ink-950); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(21,154,89,.14);
}
input::placeholder { color: var(--ink-300); }
.field { margin-bottom: var(--sp-4); }
.field-hint { font-size: 12.5px; color: var(--ink-600); margin-top: var(--sp-2); line-height: 1.5; }

/* --- Journey rail -------------------------------------------------------
   The migration has a fixed shape: confirm the site, compare the two
   versions, read the scorecard. Showing where the owner is, and what is
   next, is most of what makes a multi-step flow feel easy. */
.rail { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-8); flex-wrap: wrap; }
.rail-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; font-weight: 600; color: var(--ink-400); }
.rail-dot {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  background: var(--ink-100); color: var(--ink-600); border: 1px solid var(--ink-200);
}
.rail-item.done .rail-dot { background: var(--green-100); color: var(--green-600); border-color: var(--green-500); }
.rail-item.now .rail-dot { background: var(--ink-950); color: #fff; border-color: var(--ink-950); }
.rail-item.now { color: var(--ink-950); }
.rail-sep { flex: 1; min-width: 14px; height: 1px; background: var(--ink-200); }

/* --- Step header -------------------------------------------------------- */
.step-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.step-num {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  background: var(--ink-950); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700;
}
.step-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 4px; }
.step-sub { font-size: 14px; color: var(--ink-600); line-height: 1.55; margin: 0; }

/* --- Choice cards (platform picker) ------------------------------------- */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.choice {
  display: block; text-align: left; padding: var(--sp-4);
  border: 1px solid var(--ink-200); border-radius: var(--r-md); background: #fff;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-950);
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.choice:hover { border-color: var(--ink-300); box-shadow: var(--shadow-md); }
.choice:active { transform: translateY(1px); }
.choice.on { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(21,154,89,.14); }
.choice .choice-sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-600); margin-top: var(--sp-1); }

/* --- Method cards (verification) ---------------------------------------- */
.methods { display: grid; gap: var(--sp-3); }
.method {
  border: 1px solid var(--ink-200); border-radius: var(--r-md);
  padding: var(--sp-5); background: #fff;
}
.method.rec { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(21,154,89,.10); }
.method-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.method-title { font-size: 15px; font-weight: 700; }
.method-body { font-size: 13.5px; color: var(--ink-600); line-height: 1.6; }

/* --- Copyable code ------------------------------------------------------ */
.copy {
  position: relative; background: var(--ink-950); color: var(--green-100);
  border-radius: var(--r-sm); padding: var(--sp-3) 84px var(--sp-3) var(--sp-4);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: var(--sp-3) 0;
}
.copy button {
  position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 4px 10px;
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-sm); cursor: pointer; font-weight: 600;
}
.copy button:hover { background: rgba(255,255,255,.2); }

/* --- Badges / chips ----------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-sm);
}
.badge-pass { background: var(--green-100); color: var(--green-600); }
.badge-fail { background: var(--red-100); color: var(--red-700); }
.badge-warn { background: var(--amber-100); color: var(--amber-700); }
.badge-none { background: var(--ink-100); color: var(--ink-600); }
.badge-info { background: var(--ink-950); color: #fff; }

/* --- Verdict banner ----------------------------------------------------- */
.verdict {
  border: 1px solid var(--ink-200); border-left-width: 4px; border-radius: var(--r-md);
  padding: var(--sp-5); background: #fff; display: flex; gap: var(--sp-4); align-items: flex-start;
}
.verdict.ok { border-left-color: var(--green-500); }
.verdict.bad { border-left-color: var(--red-700); }
.verdict.mid { border-left-color: #d9a441; }
.verdict-title { font-size: 17px; font-weight: 700; margin: 0 0 var(--sp-1); }
.verdict-sub { font-size: 14px; color: var(--ink-600); line-height: 1.55; margin: 0; }

/* --- Suite results ------------------------------------------------------
   A grid of checks, each scored against its own target, with the failing
   detail spelled out. This is the artifact the customer keeps. */
.suites { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.suite {
  border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  background: #fff;
}
.suite-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.suite-name { font-size: 14.5px; font-weight: 700; }
.suite-right { display: flex; align-items: center; gap: var(--sp-3); }
.suite-score { font-family: var(--font-mono); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.bar { height: 6px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill { height: 100%; background: var(--green-500); border-radius: var(--r-pill); transition: width .5s cubic-bezier(.2,.7,.3,1); }
.bar-fill.bad { background: var(--red-700); }
.bar-fill.mid { background: #d9a441; }
.suite-detail { font-size: 12.5px; color: var(--ink-600); margin-top: var(--sp-2); line-height: 1.5; }
.suite-issues { margin-top: var(--sp-3); font-size: 12.5px; background: var(--ink-50); border-radius: var(--r-sm); padding: var(--sp-3); line-height: 1.6; }
.suite-issues code { font-size: 12px; word-break: break-all; }

/* --- Progress ----------------------------------------------------------- */
.progress { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-10) var(--sp-6); }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--ink-200); border-top-color: var(--green-500);
  border-radius: 50%; animation: mk-spin .9s linear infinite; margin-bottom: var(--sp-5);
}
@keyframes mk-spin { to { transform: rotate(360deg); } }
.progress-title { font-size: 17px; font-weight: 700; margin: 0 0 var(--sp-2); }
.progress-sub { font-size: 14px; color: var(--ink-600); margin: 0; max-width: 46ch; line-height: 1.6; }
.progress-checks { margin-top: var(--sp-6); display: grid; gap: var(--sp-2); width: 100%; max-width: 380px; }
.progress-check { display: flex; align-items: center; gap: var(--sp-3); font-size: 13px; color: var(--ink-600); }
.progress-tick { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-300); flex: 0 0 16px; }
.progress-check.done { color: var(--ink-950); }
.progress-check.done .progress-tick { background: var(--green-500); border-color: var(--green-500); }

/* --- Alerts ------------------------------------------------------------- */
.alert {
  border: 1px solid var(--ink-200); border-left-width: 4px; border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-5); font-size: 14px;
  background: #fff; line-height: 1.6;
}
.alert-success { border-left-color: var(--green-500); }
.alert-error { border-left-color: var(--red-700); }
.alert-info { border-left-color: var(--ink-950); }
.alert-title { font-weight: 700; margin: 0 0 var(--sp-1); }
.alert-fix { margin-top: var(--sp-3); background: var(--ink-50); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); font-size: 13.5px; }
.alert-fix strong { display: block; margin-bottom: var(--sp-1); }

/* --- Lists / history ---------------------------------------------------- */
.rows { display: grid; gap: var(--sp-2); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4); border: 1px solid var(--ink-200); border-radius: var(--r-md); background: #fff;
}
.row:hover { border-color: var(--ink-300); }
.row-main { min-width: 0; }
.row-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.row-meta { font-size: 12.5px; color: var(--ink-600); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { flex: 0 0 auto; }

/* --- Utility ------------------------------------------------------------ */
.stack > * + * { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.center { text-align: center; }
.hide { display: none !important; }

@media (max-width: 640px) {
  .page { padding: var(--sp-6) var(--sp-4) var(--sp-10); }
  h1 { font-size: 24px; }
  .card { padding: var(--sp-5); }
  .rail { font-size: 12px; }
  .suite-top { flex-direction: column; align-items: flex-start; }
}
