:root {
  color-scheme: dark;
  --bg: #07100e;
  --surface: #0d1916;
  --surface-2: #12221e;
  --text: #f6fbf8;
  --muted: #9bb0a8;
  --line: rgba(222, 245, 235, 0.12);
  --ruby: #ff315f;
  --ruby-bright: #ff6b86;
  --jade: #42d7a1;
  --jade-soft: rgba(66, 215, 161, 0.13);
  --warning: #ffc56e;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(255, 49, 95, 0.22), transparent 30rem),
    radial-gradient(circle at 92% 28%, rgba(66, 215, 161, 0.13), transparent 24rem),
    linear-gradient(180deg, #0b1412 0, var(--bg) 28rem);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.13;
  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: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(100%, 660px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom));
}

.topline,
.brand,
.secure-pill,
.app-row,
.app-meta,
.eyebrow,
.ready-line,
.assurance > div,
footer {
  display: flex;
  align-items: center;
}

.topline {
  justify-content: space-between;
  gap: 16px;
}

.brand {
  gap: 11px;
  text-decoration: none;
}

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

.brand strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.brand-cube {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 11px);
  grid-template-rows: repeat(2, 11px);
  gap: 2px;
  width: 31px;
  height: 31px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(-7deg);
  box-shadow: 0 8px 25px rgba(255, 49, 95, 0.18);
}

.brand-cube i {
  border-radius: 3px;
  background: var(--ruby);
}

.brand-cube i:nth-child(2) {
  background: var(--ruby-bright);
}

.brand-cube i:nth-child(3) {
  grid-column: 1 / 3;
  width: 16px;
  background: var(--jade);
}

.secure-pill {
  min-height: 30px;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(66, 215, 161, 0.24);
  border-radius: 999px;
  background: var(--jade-soft);
  color: #baf6df;
  font-size: 11px;
  font-weight: 700;
}

.secure-pill i,
.ready-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 5px rgba(66, 215, 161, 0.1);
}

.intro {
  padding: 58px 4px 28px;
}

.eyebrow {
  gap: 7px;
  margin-bottom: 16px;
}

.eyebrow span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: #cad8d2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow span:first-child {
  border-color: rgba(255, 49, 95, 0.28);
  color: #ff9caf;
}

.intro h1 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(38px, 9vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.intro p {
  max-width: 570px;
  margin: 19px 0 0;
  color: #b7c8c1;
  font-size: clamp(16px, 3.7vw, 19px);
  line-height: 1.52;
}

.platform-notice {
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 197, 110, 0.25);
  border-radius: 12px;
  background: rgba(255, 197, 110, 0.08);
  color: #ffe2b4;
  font-size: 13px;
  line-height: 1.45;
}

.platform-picker {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(255, 197, 110, 0.25);
  border-radius: 16px;
  background: rgba(255, 197, 110, 0.08);
}

.platform-picker[hidden] {
  display: none;
}

.platform-picker strong {
  color: #ffe2b4;
  font-size: 15px;
}

.platform-picker > span {
  color: #cbbda8;
  font-size: 12px;
  line-height: 1.4;
}

.platform-picker > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 5px;
}

.platform-picker button {
  min-height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.platform-picker button:hover {
  border-color: rgba(66, 215, 161, 0.42);
  background: rgba(66, 215, 161, 0.1);
}

.setup-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(19, 35, 30, 0.96), rgba(10, 21, 18, 0.96));
  box-shadow: var(--shadow);
}

.setup-card.is-current {
  border-color: rgba(255, 49, 95, 0.28);
}

.setup-card.is-complete {
  border-color: rgba(66, 215, 161, 0.28);
}

.setup-card::after {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 49, 95, 0.055);
  content: "";
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
  color: #d9e7e1;
  font-size: 13px;
  font-weight: 900;
}

.is-current .step-number {
  border-color: transparent;
  background: var(--ruby);
  color: white;
}

.is-complete .step-number {
  border-color: transparent;
  background: var(--jade);
  color: #052018;
}

.step-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.step-body h2 {
  margin: 1px 0 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.step-body > p,
.app-copy p {
  color: var(--muted);
  line-height: 1.48;
}

.step-body > p {
  margin: 7px 0 16px;
  font-size: 14px;
}

.app-row {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.app-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 17px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.app-copy {
  min-width: 0;
}

.app-copy h2 {
  margin-top: 1px;
}

.app-copy p {
  margin: 4px 0 9px;
  font-size: 13px;
}

.app-meta {
  flex-wrap: wrap;
  gap: 5px;
}

.app-meta span {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: #bfd0c9;
  font-size: 10px;
  font-weight: 700;
}

.app-meta span:last-child {
  background: var(--jade-soft);
  color: #9cebcf;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  gap: 10px;
  border-radius: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--ruby), #d81749);
  color: white;
  box-shadow: 0 14px 28px rgba(255, 49, 95, 0.22);
  text-decoration: none;
}

.secondary-button {
  border: 1px solid rgba(66, 215, 161, 0.32);
  background: linear-gradient(135deg, rgba(66, 215, 161, 0.18), rgba(66, 215, 161, 0.08));
  color: #cefae9;
}

.primary-button svg,
.secondary-button svg,
.assurance svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:hover,
.secondary-button:hover:not(:disabled) {
  filter: brightness(1.07);
}

.primary-button:active,
.secondary-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

.primary-button:disabled,
.primary-button[aria-disabled="true"],
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.48;
  pointer-events: none;
}

.store-note {
  margin: 10px 0 0 !important;
  color: #c1b5a3 !important;
  font-size: 11px !important;
  text-align: center;
}

.install-help {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 197, 110, 0.2);
  border-radius: 12px;
  background: rgba(255, 197, 110, 0.065);
  color: #f5dfbb;
  font-size: 12px;
  line-height: 1.45;
}

.install-help[hidden] {
  display: none;
}

.direct-download-fallback {
  margin: 5px 0 0;
  color: #e9d4b0;
}

.direct-download-fallback a {
  color: #aeead4;
  font-weight: 800;
  text-underline-offset: 3px;
}

.text-button {
  margin: 10px auto 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: #aeead4;
  font-size: 12px;
  cursor: pointer;
}

.inline-status {
  min-height: 18px;
  margin: 10px 0 0 !important;
  color: #b8c9c2 !important;
  font-size: 12px !important;
  text-align: center;
}

.inline-status.is-error {
  color: #ffc0cc !important;
}

.ready-line {
  gap: 10px;
  color: #baf6df;
  font-size: 13px;
  font-weight: 750;
}

.assurance {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
}

.assurance > div {
  gap: 13px;
  min-height: 72px;
  padding: 14px 17px;
  background: rgba(11, 24, 20, 0.97);
}

.assurance svg {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  color: var(--jade);
}

.assurance strong,
.assurance small {
  display: block;
}

.assurance strong {
  font-size: 13px;
}

.assurance small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.help-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.help-card summary {
  padding: 15px 17px;
  color: #c5d5cf;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.help-content {
  display: grid;
  gap: 11px;
  padding: 0 17px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.help-content p,
.help-content .text-button {
  margin: 0;
}

.help-content .text-button {
  justify-self: start;
}

.help-content a {
  color: #9fbeaF;
}

footer {
  flex-direction: column;
  gap: 9px;
  padding: 27px 10px 4px;
  color: #71877e;
  font-size: 10px;
  text-align: center;
}

footer a {
  color: #adc2ba;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 36px), 520px);
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(21, 35, 31, 0.96);
  color: #eaf5f0;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.toast[hidden] {
  display: none;
}

:focus-visible {
  outline: 3px solid rgba(66, 215, 161, 0.55);
  outline-offset: 3px;
}

@media (max-width: 460px) {
  .page-shell {
    padding-inline: 13px;
  }

  .secure-pill {
    width: 31px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .intro {
    padding-top: 45px;
  }

  .setup-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 17px 15px;
    border-radius: 18px;
  }

  .step-number {
    width: 30px;
    height: 30px;
  }

  .app-icon {
    width: 57px;
    height: 57px;
    border-radius: 15px;
  }

  .app-meta span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
