:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 82% 4%, rgb(208 222 255 / 62%), transparent 34rem),
    #f3f6fb;
}

button,
input {
  font: inherit;
}

.installer-shell {
  width: min(100% - 2rem, 820px);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.installer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #315ed3;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.installer-brand strong,
.installer-brand small {
  display: block;
}

.installer-brand strong {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.installer-brand small {
  margin-top: 0.15rem;
  color: #64728a;
  font-size: 0.65rem;
  letter-spacing: 0.13em;
}

.installer-card {
  overflow: hidden;
  border: 1px solid #e1e7f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgb(21 39 71 / 9%);
}

.card-heading {
  position: relative;
  padding: 2rem 2rem 1.65rem;
  border-bottom: 1px solid #edf0f5;
  background: linear-gradient(120deg, #fff 50%, #f2f6ff);
}

.step-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  border: 1px solid #dfe7f7;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: #315ed3;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 750;
}

.step-badge span {
  color: #98a5ba;
  font-weight: 550;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: #53647d;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.card-heading h1,
.completion-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2rem);
  letter-spacing: -0.035em;
}

.intro-copy {
  max-width: 42rem;
  margin: 0.7rem 0 0;
  color: #64728a;
  line-height: 1.6;
}

.form-content {
  padding: 0.25rem 2rem 2rem;
}

.notice {
  margin: 1.25rem 2rem 0;
  border: 1px solid #d6e3ff;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #244b9a;
  background: #f1f5ff;
  line-height: 1.5;
}

.installer-form {
  display: grid;
}

.form-section {
  padding: 1.55rem 0;
  border-bottom: 1px solid #edf0f5;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.section-title > span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #315ed3;
  background: #edf2ff;
  font-size: 0.83rem;
  font-weight: 750;
}

.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-title p {
  margin: 0.25rem 0 0;
  color: #748198;
  font-size: 0.88rem;
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-left: 2.4rem;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  color: #29364d;
  font-size: 0.88rem;
  font-weight: 650;
}

.field-hint {
  margin-left: 0.35rem;
  color: #748198;
  font-size: 0.78rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd4e2;
  border-radius: 9px;
  padding: 0.65rem 0.75rem;
  color: #172033;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus-visible {
  border-color: #6f91e9;
  outline: 0;
  box-shadow: 0 0 0 3px rgb(86 123 218 / 17%);
}

.field small {
  color: #748198;
  font-size: 0.78rem;
  line-height: 1.45;
}

.field small.warning {
  color: #986016;
}

.danger-zone {
  margin: 1.35rem 0 0;
  border: 1px solid #f0dfc8;
  border-radius: 12px;
  padding: 1.1rem;
  background: #fffaf3;
}

.danger-zone .section-title {
  margin-bottom: 0.9rem;
}

.section-title > span.danger-number {
  color: #a36512;
  background: #fff0d9;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.9rem 0 1.1rem;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0.1rem 0 0;
  accent-color: #b52e42;
}

.checkbox-row span,
.checkbox-row strong,
.checkbox-row small {
  display: block;
}

.checkbox-row strong {
  color: #573d25;
  font-size: 0.88rem;
}

.checkbox-row small {
  margin-top: 0.25rem;
  color: #8a6e53;
  font-size: 0.8rem;
  line-height: 1.5;
}

.danger-zone > .field {
  padding-left: 1.7rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
}

.form-actions > span {
  color: #748198;
  font-size: 0.78rem;
  line-height: 1.45;
}

.primary-button,
.primary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 9px;
  padding: 0.7rem 1.1rem;
  color: #fff;
  background: #315ed3;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
}

.primary-button:hover,
.primary-link:hover {
  background: #244bb1;
}

.primary-button:active,
.primary-link:active {
  transform: translateY(1px);
}

.primary-button:focus-visible,
.primary-link:focus-visible {
  outline: 3px solid #9db8ff;
  outline-offset: 3px;
}

.installer-footnote {
  margin: 1.25rem 0 0;
  color: #8290a5;
  font-size: 0.78rem;
  text-align: center;
}

.completion-card {
  padding: clamp(1.5rem, 6vw, 3rem);
  text-align: center;
}

.completion-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  color: #197448;
  background: #e8f7ef;
  font-size: 1.8rem;
  font-weight: 750;
}

.completion-card .eyebrow {
  color: #197448;
}

.account-summary {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 360px);
  margin: 1.5rem auto;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  padding: 1rem;
  background: #f8faff;
}

.account-summary span,
.help-copy {
  color: #64728a;
  font-size: 0.88rem;
}

.account-summary strong {
  font-size: 1.1rem;
}

.completion-card .primary-link {
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .installer-shell {
    width: min(100% - 1.25rem, 820px);
    padding-top: 1.25rem;
  }

  .installer-brand {
    margin-bottom: 1rem;
  }

  .card-heading {
    padding: 1.5rem 1.2rem 1.25rem;
  }

  .step-badge {
    top: 1.5rem;
    right: 1.2rem;
  }

  .form-content {
    padding: 0.1rem 1.2rem 1.3rem;
  }

  .notice {
    margin-right: 1.2rem;
    margin-left: 1.2rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .field-wide {
    grid-column: auto;
  }

  .danger-zone {
    padding: 0.9rem;
  }

  .danger-zone > .field {
    padding-left: 0;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
