:root {
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --muted-strong: rgba(255, 255, 255, 0.85);
  --canvas: #030508;
  --canvas-soft: #07101d;
  --panel: #07101d;
  --panel-strong: #0b1830;
  --line: rgba(255, 255, 255, 0.62);
  --line-soft: rgba(255, 255, 255, 0.22);
  --green: #143c6a;
  --green-bright: #64a8e8;
  --pink: #ffb3ba;
  --yellow: #6b8daf;
  --font-display: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: -0.01em;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

/* Shared header treatment for the private area. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 64px, 1180px);
  min-height: 82px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
}
.brand-word { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; }
.topbar-meta { display: flex; align-items: center; gap: 18px; }
.connection-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.status-dot.is-connected { background: var(--green-bright); }
.ghost-button { padding: 6px 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.ghost-button:hover { color: var(--ink); }

.landing-screen, .flow-screen {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 58% 78% at 90% 26%, rgba(13, 42, 79, 0.82) 0%, rgba(5, 15, 30, 0.54) 36%, transparent 69%),
    radial-gradient(ellipse 67% 50% at 6% 101%, rgba(10, 36, 68, 0.72) 0%, rgba(4, 13, 27, 0.4) 47%, transparent 74%),
    linear-gradient(118deg, #020305 0%, #05090f 50%, #030507 100%);
}
.landing-screen { position: relative; display: grid; place-items: center; min-height: 100svh; }
.landing-brand { position: absolute; top: 20px; left: 20px; }
.landing-brand .brand { gap: 7px; }
.landing-brand .brand-mark {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
}
.landing-brand .brand-word { font-size: 13px; font-weight: 300; letter-spacing: -0.02em; }
.landing-content { width: min(calc(100% - 48px), 515px); margin: -4.25vh auto 0; text-align: center; }
.landing-content h1 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(36px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.landing-content p { margin: 17px 0 21px; color: rgba(255, 255, 255, 0.88); font-size: 17px; font-weight: 300; line-height: 1.55; }
.landing-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 262px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  color: #07101b;
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.landing-start:hover { color: #fff; border-color: #6ba8df; background: #15446f; }
.landing-start svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }

.flow-screen { position: relative; min-height: 100svh; padding: 184px 24px 118px; }
.return-hint { position: fixed; z-index: 2; top: 49px; left: 50px; margin: 0; color: rgba(255, 255, 255, 0.86); font-size: 12px; font-weight: 300; }
.return-hint strong { font-weight: 500; }
.experience-utility, .stepper-panel { display: none; }
.form-panel { width: min(100%, 563px); margin: 0 auto; }
.form-panel-header { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.form-panel-header h2, .form-panel-header p { margin: 0; }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 42px; }
.field, .field--full { min-width: 0; }
.field label, .field legend { display: block; margin: 0 0 9px; padding: 0; color: #fff; font-size: 18px; font-weight: 300; line-height: 1.4; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%;
  padding: 7px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  color: #fff;
  background-color: transparent;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.35;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.55); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--green-bright); outline: none; }
.field select {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.82) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.82) 50%, transparent 50%);
  background-position: calc(100% - 12px) 18px, calc(100% - 7px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option { color: #fff; background: #07101d; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-bottom-color: var(--pink); }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex;
  align-items: center;
  min-height: 43px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.47);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.25;
}
.choice label:hover { border-color: #fff; color: #fff; }
.choice input:checked + label { border-color: #72b3ef; color: #fff; background: rgba(24, 72, 119, 0.55); }
.choice input:focus-visible + label { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.consent-field { display: flex; align-items: flex-start; gap: 10px; padding-top: 1px; }
.consent-field input { accent-color: var(--green-bright); margin-top: 4px; }
.consent-field label { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 12px; line-height: 1.5; cursor: pointer; }
.form-message { min-height: 18px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.form-message.is-error { color: var(--pink); }
.form-message.is-success { color: var(--green-bright); }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 2px; }
.form-actions .secondary-button { display: none; }
.primary-button, .secondary-button {
  min-width: 126px;
  min-height: 37px;
  padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  color: #07101b;
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.primary-button:hover { color: #fff; border-color: #70afea; background: #15446f; }
.primary-button:disabled { opacity: 0.75; cursor: progress; }
.stage-navigation { position: fixed; z-index: 3; right: 30px; bottom: 12px; display: flex; gap: 0; }
.stage-navigation button {
  display: grid;
  width: 50px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 0;
  color: #fff;
  background: rgba(1, 4, 10, 0.14);
}
.stage-navigation button:hover { border-color: #85bee9; color: #9bd0f5; background: rgba(10, 42, 76, 0.55); }
.stage-navigation svg { width: 31px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.84); }
.success-modal { width: min(100%, 540px); padding: 40px; border: 1px solid var(--line-soft); border-radius: 3px; background: #07101d; }
.success-check { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 24px; border: 1px solid var(--green-bright); border-radius: 50%; color: var(--green-bright); font-size: 18px; }
.success-modal h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 32px; font-weight: 300; letter-spacing: -0.05em; line-height: 1.08; }
.success-modal p:not(.eyebrow):not(.protocol) { margin: 15px 0 0; color: var(--muted); line-height: 1.55; }
.protocol { margin: 28px 0; padding: 13px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--green-bright); font-size: 12px; letter-spacing: 0.06em; }
.success-modal .primary-button { display: inline-flex; align-items: center; gap: 12px; }
.button-arrow { font-size: 15px; line-height: 1; }
.eyebrow { display: none; }

@media (max-width: 720px) {
  .landing-brand { top: 17px; left: 19px; }
  .landing-content { width: min(calc(100% - 38px), 515px); margin-top: -5vh; }
  .landing-content p { font-size: 16px; }
  .flow-screen { padding: 93px 24px 98px; }
  .return-hint { top: 26px; left: 24px; right: 24px; font-size: 10px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-navigation { right: 18px; bottom: 14px; }
  .stage-navigation button { width: 45px; height: 42px; }
  .success-modal { padding: 30px 24px; }
}

@media (max-width: 420px) {
  .landing-content h1 { font-size: 36px; }
  .landing-content p { font-size: 15px; }
  .landing-start { width: min(262px, 100%); }
  .flow-screen { padding-right: 20px; padding-left: 20px; }
  .return-hint { left: 20px; right: 20px; }
  .field label, .field legend { font-size: 16px; }
  .choice-grid { grid-template-columns: 1fr; }
}
