:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #657088;
  --line: #dfe4ed;
  --surface: #ffffff;
  --bg: #f2f5fa;
  --brand: #2956d8;
  --brand-dark: #1f43aa;
  --ok-bg: #e9f8ef;
  --ok: #17653a;
  --bad-bg: #fff0f0;
  --bad: #a32323;
  --warn-bg: #fff7dc;
  --warn: #745400;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #e4ebff 0, transparent 34rem), var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--brand); }
.shell { width: min(760px, calc(100% - 32px)); margin: 48px auto; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(32, 49, 82, .08);
  padding: 32px;
  margin-bottom: 20px;
}
.eyebrow { color: var(--brand); font-size: 13px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.08; margin: 10px 0 12px; }
h2 { margin: 0 0 18px; font-size: 22px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.steps { margin: 26px 0; padding-left: 22px; }
.steps li { padding: 4px 0 4px 6px; }
form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; font-weight: 650; }
input {
  width: 100%;
  border: 1px solid #cbd3e1;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus { outline: 3px solid rgba(41, 86, 216, .16); border-color: var(--brand); }
.migration-choice {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid #cbd3e1;
  border-radius: 11px;
  background: #f7f9ff;
  cursor: pointer;
}
.migration-choice input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--brand); }
.migration-choice span { display: grid; gap: 3px; }
.migration-options { display: grid; gap: 17px; }
small { color: var(--muted); font-weight: 450; }
button, .button-link {
  border: 0;
  border-radius: 11px;
  padding: 13px 18px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: 700 16px/1.2 inherit;
  text-align: center;
  text-decoration: none;
}
button:hover, .button-link:hover { background: var(--brand-dark); }
button.secondary { background: #e9edfa; color: #233a7d; }
button.secondary:hover { background: #dce3f8; }
.notice { display: grid; gap: 3px; border-radius: 11px; padding: 14px 16px; margin: 20px 0; }
.notice.success { background: var(--ok-bg); color: var(--ok); }
.notice.error { background: var(--bad-bg); color: var(--bad); }
.notice.warning { background: var(--warn-bg); color: var(--warn); }
.notice.compact { margin: 0 0 16px; }
.technical-error { margin-top: 7px; overflow-wrap: anywhere; }
.technical-error code { color: inherit; font-size: 13px; }
.scope { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 20px; }
.scope p { color: var(--muted); margin: 5px 0 0; }
.status-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
.status-form button { height: 49px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; }
.status-grid div { background: #f5f7fb; border-radius: 10px; padding: 12px; }
.status-grid dt { color: var(--muted); font-size: 12px; }
.status-grid dd { margin: 3px 0 0; font-weight: 700; }
.error-page p { color: var(--muted); margin-bottom: 24px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.credentials {
  display: grid;
  gap: 18px;
  padding: 20px;
  margin: 22px 0;
  border: 2px solid #b9c9fa;
  border-radius: 14px;
  background: #f7f9ff;
}
.credential-label { display: block; color: var(--muted); font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.credentials strong { font-size: 19px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; font-weight: 700; }
.copy-button { padding-inline: 14px; }
.copy-status { min-height: 1.4em; color: var(--ok); font-size: 13px; }
.primary-link {
  display: block;
  border-radius: 11px;
  padding: 14px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.primary-link:hover { background: var(--brand-dark); }
.settings-box { margin-top: 22px; padding: 18px; border-radius: 12px; background: #f5f7fb; }
.settings-box p { margin: 7px 0 0; }
.access-box { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 22px; }
.access-box h2 { margin-bottom: 8px; }
.access-box > p { color: var(--muted); margin: 0; }
.portal-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.secondary-link { background: #e9edfa; color: #233a7d; }
.secondary-link:hover { background: #dce3f8; }
.client-settings { padding: 18px; border-radius: 12px; background: #f5f7fb; }
.client-settings p { margin: 7px 0; }
.client-settings ul { margin: 8px 0 0; padding-left: 21px; }
.client-settings li { margin: 5px 0; }
.again { display: block; margin-top: 22px; text-align: center; }

@media (max-width: 700px) {
  .shell { margin: 18px auto; }
  .card { padding: 22px; border-radius: 14px; }
  .status-form, .status-grid { grid-template-columns: 1fr; }
  .copy-row { grid-template-columns: 1fr; }
  .portal-links { grid-template-columns: 1fr; }
}
