:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  background: #081020;
  color: #f7f9ff;
  font-synthesis: none;
  --ink: #f7f9ff;
  --muted: #a9b4cc;
  --line: rgb(255 255 255 / 10%);
  --panel: rgb(16 27 51 / 82%);
  --field: rgb(4 11 25 / 72%);
  --cyan: #58d7f6;
  --blue: #447cff;
  --purple: #8e5cff;
  --green: #62e8ad;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-height: 100%; background: #081020; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 8%, rgb(74 93 255 / 22%), transparent 34%),
    radial-gradient(circle at 88% 24%, rgb(69 217 229 / 14%), transparent 32%),
    linear-gradient(165deg, #0d1830 0%, #081020 44%, #060b16 100%);
}

body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.ambient-one { top: -100px; right: -80px; background: rgb(89 100 255 / 34%); }
.ambient-two { bottom: 3%; left: -130px; background: rgb(47 211 223 / 18%); }

.shell {
  width: min(100%, 470px);
  margin: 0 auto;
  animation: arrive .45s ease-out both;
}

.auth-gate {
  padding-top: min(17vh, 132px);
}

.auth-brand {
  width: min(100%, 430px);
  margin-inline: auto;
}

.auth-card {
  width: min(100%, 430px);
  margin-inline: auto;
  padding: 30px 24px;
  text-align: center;
}

.auth-shield {
  display: inline-block;
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 19px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(88 215 246 / 18%), rgb(98 232 173 / 12%));
  box-shadow: 0 12px 36px rgb(88 215 246 / 13%);
}

.auth-shield.shield-icon::before { inset: 12px 14px; }
.auth-card h1 { margin-inline: auto; font-size: clamp(31px, 8.5vw, 43px); line-height: 1.04; }
.auth-copy { margin: 18px auto 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.native-handoff { padding-top: min(20vh, 140px); }
.native-handoff .setup-card { text-align: center; }
.native-handoff h1 { margin-inline: auto; font-size: clamp(32px, 9vw, 46px); }
.native-handoff .input-hint { margin: 18px auto 22px; max-width: 360px; line-height: 1.55; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 14px;
  background: linear-gradient(145deg, #61dcf3 0%, #536cff 56%, #9458f7 100%);
  box-shadow: 0 9px 28px rgb(68 124 255 / 32%), inset 0 1px rgb(255 255 255 / 48%);
  transform: rotate(-5deg);
}

.brand-mark span {
  color: white;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.07em;
  transform: rotate(5deg);
}

.brand-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 16px; letter-spacing: -.01em; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .03em; }

.availability {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgb(98 232 173 / 18%);
  border-radius: 999px;
  background: rgb(98 232 173 / 8%);
  color: #a9f6cf;
  font-size: 11px;
  font-weight: 700;
}

.availability i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.hero { padding: 2px 2px 0; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1 {
  max-width: 390px;
  margin: 0;
  font-size: clamp(35px, 10vw, 49px);
  font-weight: 820;
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: balance;
}

#intro {
  max-width: 410px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.52;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 23px 0 15px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgb(255 255 255 / 4%);
  backdrop-filter: blur(12px);
}

.trust-item > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.trust-item strong { font-size: 11px; overflow-wrap: anywhere; }
.trust-item small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }

.trust-icon {
  position: relative;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgb(88 215 246 / 10%);
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 9px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 8.5px;
  top: 5px;
  width: 6px;
  height: 7px;
  border: 1.5px solid var(--cyan);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.bolt-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 8px;
  height: 15px;
  background: var(--cyan);
  clip-path: polygon(55% 0, 100% 0, 67% 40%, 100% 40%, 25% 100%, 43% 53%, 0 53%);
}

.shield-icon::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  background: var(--cyan);
  clip-path: polygon(50% 0, 100% 17%, 91% 69%, 50% 100%, 9% 69%, 0 17%);
}

.setup-card {
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 24px;
  background: linear-gradient(155deg, rgb(24 38 70 / 91%), rgb(10 18 35 / 91%));
  box-shadow: 0 24px 60px rgb(0 0 0 / 28%), inset 0 1px rgb(255 255 255 / 8%);
  backdrop-filter: blur(20px);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  color: #dce4f7;
  font-size: 13px;
  font-weight: 700;
}

.step-label span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgb(88 215 246 / 14%);
  color: var(--cyan);
  font-size: 11px;
}

.input-wrap { position: relative; }

input, select, button { width: 100%; min-height: 54px; border-radius: 15px; font: inherit; }

input, select {
  padding: 0 15px 0 47px;
  border: 1px solid rgb(255 255 255 / 13%);
  outline: 0;
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

select {
  appearance: none;
  padding-left: 15px;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #8fa3c8 50%),
    linear-gradient(135deg, #8fa3c8 50%, transparent 50%);
  background-position: calc(100% - 21px) 24px, calc(100% - 15px) 24px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

input:focus, select:focus {
  border-color: rgb(88 215 246 / 72%);
  background: rgb(4 11 25 / 90%);
  box-shadow: 0 0 0 4px rgb(88 215 246 / 9%);
}

input:disabled { opacity: .62; }

.phone-icon {
  position: absolute;
  z-index: 1;
  left: 18px;
  top: 16px;
  width: 14px;
  height: 22px;
  border: 1.5px solid #8fa3c8;
  border-radius: 4px;
  pointer-events: none;
}

.phone-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 4px;
  height: 1px;
  border-radius: 2px;
  background: #8fa3c8;
}

.input-hint { margin: 7px 2px 13px; color: #8190ad; font-size: 11px; }

button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
  border: 0;
  padding: 0 16px;
  color: white;
  font-weight: 760;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled):active { transform: scale(.985); }

button.primary {
  background: linear-gradient(105deg, #437bff, #6a62ff 55%, #8c5bf4);
  box-shadow: 0 13px 30px rgb(74 99 255 / 29%), inset 0 1px rgb(255 255 255 / 23%);
}

button.secondary {
  border: 1px solid rgb(88 215 246 / 24%);
  background: rgb(88 215 246 / 8%);
  color: #dffaff;
}

button.secondary.recommended {
  border-color: rgb(98 232 173 / 35%);
  background: linear-gradient(105deg, rgb(25 165 143 / 34%), rgb(49 112 190 / 34%));
  box-shadow: inset 0 1px rgb(255 255 255 / 10%);
}

.app-install {
  display: block;
  margin: 8px 0 3px;
  color: #9fc4ff;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.app-install:active { color: #d7e7ff; }

button:disabled { cursor: default; opacity: .38; filter: saturate(.45); }

.button-icon { display: inline-block; position: relative; width: 20px; height: 20px; flex: 0 0 auto; }
.plus-icon::before, .plus-icon::after { content: ""; position: absolute; border-radius: 2px; background: currentColor; }
.plus-icon::before { left: 4px; top: 9px; width: 12px; height: 2px; }
.plus-icon::after { left: 9px; top: 4px; width: 2px; height: 12px; }

.wireguard-icon {
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 40px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid rgb(98 232 173 / 12%);
  border-radius: 13px;
  background: rgb(98 232 173 / 6%);
  color: #bcefd6;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.42;
}

.status[data-failed="true"] {
  border-color: rgb(255 117 130 / 16%);
  background: rgb(255 83 108 / 7%);
  color: #ffbec7;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgb(98 232 173 / 72%);
}

.status[data-failed="true"] .status-dot { background: #ff7582; box-shadow: 0 0 8px rgb(255 117 130 / 65%); }

.text-action {
  min-height: 42px;
  margin-top: 8px;
  background: transparent;
  color: #9fc4ff;
  font-size: 13px;
  box-shadow: none;
}

.device-panel { margin-top: 14px; }
.device-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.device-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.device-heading .eyebrow { margin-bottom: 5px; }
.icon-action { width: 42px; min-height: 42px; flex: 0 0 auto; margin: 0; background: rgb(255 255 255 / 7%); font-size: 25px; }
.device-note { margin: 12px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.device-list { display: grid; gap: 9px; }
.device-empty { margin: 5px 0 12px; color: var(--muted); font-size: 13px; }
.device-row { padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / 4%); }
.device-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.device-row strong, .device-row small { overflow-wrap: anywhere; }
.device-row strong { font-size: 14px; }
.device-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.device-state { color: #a9f6cf; font-size: 11px; font-weight: 750; }
.device-state[data-active="false"] { color: #ffbec7; }
.device-revoke { min-height: 40px; margin-top: 10px; border: 1px solid rgb(255 117 130 / 22%); background: rgb(255 83 108 / 8%); color: #ffbec7; font-size: 12px; }
button.danger { min-height: 46px; border: 1px solid rgb(255 117 130 / 26%); background: rgb(255 83 108 / 8%); color: #ffbec7; font-size: 13px; }

footer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 16px 13px 2px;
  color: #75839f;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
}

.handoff-body {
  display: grid;
  place-items: center;
}

.handoff-shell {
  width: min(100%, 470px);
  animation: arrive .35s ease-out both;
}

.handoff-brand { margin-bottom: 18px; }

.handoff-card {
  padding: 27px 22px 22px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 26px;
  background: linear-gradient(155deg, rgb(24 38 70 / 94%), rgb(10 18 35 / 94%));
  box-shadow: 0 24px 60px rgb(0 0 0 / 30%), inset 0 1px rgb(255 255 255 / 8%);
  text-align: center;
}

.handoff-shield {
  display: inline-block;
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(88 215 246 / 18%), rgb(98 232 173 / 12%));
  box-shadow: 0 12px 36px rgb(88 215 246 / 13%);
}

.handoff-shield.shield-icon::before { inset: 12px 14px; }

.handoff-card .eyebrow { margin-bottom: 12px; }

.handoff-card h1 {
  max-width: 410px;
  margin-inline: auto;
  font-size: clamp(31px, 8.5vw, 43px);
  line-height: 1.04;
}

.handoff-copy {
  margin: 18px auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.handoff-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  background: linear-gradient(105deg, #437bff, #6a62ff 55%, #8c5bf4);
  box-shadow: 0 13px 30px rgb(74 99 255 / 29%), inset 0 1px rgb(255 255 255 / 23%);
  color: white;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.handoff-action:active { transform: scale(.985); }

.handoff-action[aria-disabled="true"] {
  opacity: .38;
  pointer-events: none;
}

.handoff-install { margin: 13px 0 4px; }

.footer-lock {
  position: relative;
  width: 10px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 2px;
  background: #75839f;
}

.footer-lock::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -5px;
  width: 6px;
  height: 6px;
  border: 1px solid #75839f;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.billing-panel { margin-top: 14px; }

.billing-panel h2 { margin: 6px 0 10px; }

.billing-status {
  margin: 14px 0;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 360px) {
  body { padding-inline: 12px; }
  .availability { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { padding: 9px 11px; }
  .trust-item small { display: inline; }
  h1 { font-size: 35px; }
}

@media (min-width: 720px) {
  .shell { width: min(100%, 760px); }
  .hero, .trust-grid, .setup-card, footer { width: min(100%, 620px); margin-inline: auto; }
  .device-panel { margin-top: 14px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .brand { margin-bottom: 15px; }
  .trust-grid { margin-block: 14px 10px; }
  h1 { font-size: clamp(31px, 7vw, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  .shell { animation: none; }
  button, input { transition: none; }
}
