:root {
  --ink: #0f172a;
  --muted: #5a6478;
  --line: #dfe4ec;
  --line-strong: #c5cddb;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --accent: #2b50e0;
  --accent-hover: #2242c2;
  --accent-soft: #eef2ff;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --good: #067647;
  --navy: #0b1220;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.shell {
  display: grid;
  grid-template-columns: minmax(340px, 5fr) 7fr;
  min-height: 100vh;
}

/* Brand column */
.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 48px clamp(32px, 5vw, 72px);
  color: #e7ecf6;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
.wordmark {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
}
.wordmark span { color: #7b9cff; }
.brand-body { max-width: 460px; }
.eyebrow {
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa6e8;
}
.brand h1 {
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: #fff;
}
.lead { margin-top: 16px; font-size: 1.05rem; color: #aab5cc; }
.assurances { margin-top: 40px; display: grid; gap: 22px; }
.assurances li { display: flex; gap: 14px; align-items: flex-start; }
.assurances svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: #7b9cff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.assurances strong { display: block; font-weight: 600; color: #fff; font-size: 0.97rem; }
.assurances span { display: block; font-size: 0.9rem; color: #94a1ba; }
.brand-foot { font-size: 0.82rem; color: #6f7c96; }

/* Form column */
.panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.panel-inner { width: 100%; max-width: 520px; }

.steps { display: flex; gap: 8px; margin-bottom: 36px; }
.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 3px solid var(--line);
  font-size: 0.85rem;
  font-weight: 550;
  color: #8892a6;
  transition: border-color 0.2s, color 0.2s;
}
.steps .dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  background: var(--line);
  color: #6b7488;
  transition: background 0.2s, color 0.2s;
}
.steps li.is-current { border-color: var(--accent); color: var(--ink); }
.steps li.is-current .dot { background: var(--accent); color: #fff; }
.steps li.is-done { border-color: var(--accent); color: var(--ink); }
.steps li.is-done .dot { background: var(--good); color: #fff; }

.step { animation: rise 0.28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step h2 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; outline: none; }
.sub { margin-top: 8px; color: var(--muted); }
.sub strong { color: var(--ink); font-weight: 600; }

/* Platform choice */
.options { margin-top: 28px; display: grid; gap: 12px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; }
.option .card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.option:hover .card { border-color: var(--line-strong); }
.option input:focus-visible + .card { box-shadow: 0 0 0 4px rgba(43, 80, 224, 0.2); border-color: var(--accent); }
.option input:checked + .card { border-color: var(--accent); background: var(--accent-soft); }
.option .icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--navy);
}
.option .icon svg { width: 24px; height: 24px; fill: none; stroke: #7b9cff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.option .text { flex: 1; min-width: 0; }
.option .name { display: block; font-weight: 600; }
.option .desc { display: block; font-size: 0.9rem; color: var(--muted); }
.option .radio {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
}
.option input:checked + .card .radio { border-color: var(--accent); }
.option input:checked + .card .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Form */
form { margin-top: 28px; display: grid; gap: 20px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { min-width: 0; }
label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #98a1b3; }
input:hover { border-color: #aab4c6; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43, 80, 224, 0.16); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14); }

.hint { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 0.86rem; font-weight: 500; color: var(--danger); }
.form-error {
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f4c7c3;
  border-radius: 8px;
}

.password { position: relative; }
.password input { padding-right: 72px; }
.reveal {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.reveal:hover { background: var(--accent-soft); }
.reveal:focus-visible { outline: 2px solid var(--accent); }

.meter { margin-top: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meter span { height: 4px; border-radius: 2px; background: var(--line); transition: background 0.2s; }
.meter[data-level="1"] span:nth-child(-n+1) { background: #d92d20; }
.meter[data-level="2"] span:nth-child(-n+2) { background: #f79009; }
.meter[data-level="3"] span:nth-child(-n+3) { background: #5da53c; }
.meter[data-level="4"] span:nth-child(-n+4) { background: var(--good); }

/* Honeypot, kept off-screen rather than display:none */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consent checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-weight: 400; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check .box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.check input:checked + .box {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3.2L15 6.8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: var(--accent);
}
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(43, 80, 224, 0.2); border-color: var(--accent); }
.check input[aria-invalid="true"] + .box { border-color: var(--danger); }

/* Buttons */
.actions { margin-top: 28px; }
form .actions { margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 22px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn.primary { color: #fff; background: var(--accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(43, 80, 224, 0.28); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 18px -6px;
  padding: 6px 10px 6px 6px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { color: var(--ink); background: #e9edf4; }
.back:focus-visible { outline: 2px solid var(--accent); }

/* Success */
.success-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #e7f6ee;
}
.success-mark svg { width: 28px; height: 28px; fill: none; stroke: var(--good); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.summary { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.summary div + div { border-top: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 600; word-break: break-all; text-align: right; }

/* Announcements */
.announcements { display: grid; gap: 10px; margin-bottom: 24px; }
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
}
.notice-text { flex: 1; min-width: 0; }
.notice strong { display: block; font-weight: 650; }
.notice p { margin-top: 2px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.notice-info { border-left-color: var(--accent); background: var(--accent-soft); }
.notice-good, .notice-success { border-left-color: var(--good); background: #ecf8f1; }
.notice-warning { border-left-color: #dc8a06; background: #fff7e6; }
.notice-urgent, .notice-danger { border-left-color: var(--danger); background: var(--danger-soft); }
.notice-close {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.notice-close:hover { background: rgba(15, 23, 42, 0.07); color: var(--ink); }
.notice-close:focus-visible { outline: 2px solid var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand { gap: 0; padding: 22px 24px; }
  .brand-body, .brand-foot { display: none; }
  .panel { align-items: flex-start; padding: 32px 20px 56px; }
}
@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .steps .label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
