:root {
  color-scheme: dark;
  font:
    16px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #e9f5ee;
  background: #07130e;
  --panel: #0c1c14;
  --panel-2: #10251a;
  --line: #284638;
  --muted: #9aafa0;
  --green: #b6f76c;
  --mint: #69e7ae;
  --red: #ff9c91;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html {
  min-width: 320px;
}
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, #123e2a 0, transparent 36rem),
    radial-gradient(circle at 8% 92%, #10271b 0, transparent 28rem), #07130e;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(#ffffff05 1px, transparent 1px), linear-gradient(90deg, #ffffff05 1px, transparent 1px);
  background-size: 48px 48px;
  content: '';
  pointer-events: none;
}
button,
select {
  font: inherit;
}
button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
a {
  color: var(--green);
}
.shell {
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 32px 24px;
  display: flex;
  flex-direction: column;
}
.topbar,
.brand,
.topbar-note,
.card-header,
.card-brand,
.card-live {
  display: flex;
  align-items: center;
}
.topbar {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid #ffffff13;
}
.brand {
  gap: 12px;
  color: #ecfff1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.08;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.23em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--green);
  color: #0a2014;
  font-size: 22px;
  letter-spacing: -0.1em;
}
.topbar-note,
.card-live {
  gap: 8px;
  color: #a5b8ab;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.live-dot,
.card-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #b6f76c18;
}
main {
  flex: 1;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 480px);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
  padding: 46px 0 26px;
}
.intro {
  max-width: 570px;
}
.eyebrow {
  margin: 0;
  color: var(--green);
  font: 700 11px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
h1 {
  margin: 18px 0 20px;
  font-size: clamp(3.7rem, 6vw, 5.35rem);
  line-height: 0.99;
  letter-spacing: -0.07em;
  font-weight: 750;
}
h1 em {
  color: var(--green);
  font-style: normal;
}
.lead {
  max-width: 510px;
  margin: 0 0 31px;
  color: #b4cabc;
  font-size: 17px;
  line-height: 1.65;
}
.setup-card {
  max-width: 505px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(135deg, #153324, #0d2118 72%);
  box-shadow: 0 18px 48px #0003;
}
.setup-heading {
  margin: 0;
  color: #e9f5ee;
  font-size: 15px;
  font-weight: 750;
}
.setup-intro {
  margin: 4px 0 14px;
  color: #a9c0af;
  font-size: 12px;
}
.action-options {
  display: grid;
  gap: 8px;
}
.action-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 51px;
  padding: 8px 12px;
  border: 1px solid #345842;
  border-radius: 9px;
  background: #0b2016;
  color: #e9f5ee;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.action-option:hover {
  border-color: #79ae84;
}
.action-option[aria-pressed='true'] {
  border-color: var(--green);
  background: #1d3b27;
  box-shadow: inset 3px 0 var(--green);
}
.action-option small {
  color: #abc7af;
  text-align: right;
  font-size: 11px;
  font-weight: 500;
}
.action-option code,
.binding-rule code {
  font: 600 0.94em/1.4 var(--mono);
}
.binding-rule {
  display: grid;
  gap: 4px;
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid #426d4d;
  border-radius: 9px;
  background: #0a1b12;
  color: #bad0bf;
  font-size: 11px;
}
.binding-rule > code {
  width: fit-content;
  color: var(--green);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.binding-rule p {
  margin: 3px 0 0;
  line-height: 1.5;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 49px;
  margin-top: 15px;
  padding: 11px 17px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #0b2515;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease;
}
.primary-button:hover:not(:disabled) {
  background: #d0ff92;
  transform: translateY(-1px);
}
.primary-button:disabled {
  opacity: 0.52;
  cursor: wait;
}
.restart-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  margin-top: 12px;
  padding: 7px 11px;
  border: 1px solid #466955;
  border-radius: 8px;
  background: transparent;
  color: #b4cabc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.restart-button:hover {
  border-color: var(--green);
  color: var(--green);
}
.setup-note {
  margin: 13px 0 0;
  color: #93aa9a;
  font-size: 12px;
  line-height: 1.55;
}
.challenge-card {
  min-height: 590px;
  padding: 21px 22px 18px;
  border: 1px solid #2c5140;
  border-radius: 22px;
  background: linear-gradient(180deg, #162a1e, var(--panel) 21%);
  box-shadow:
    inset 0 1px #ffffff12,
    0 32px 70px #0007;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 16px;
}
.challenge-card::before {
  position: absolute;
  top: 0;
  right: 25%;
  left: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b6f76c80, transparent);
  content: '';
}
.card-header {
  justify-content: space-between;
  gap: 12px;
}
.card-brand {
  gap: 8px;
  color: #d9e8df;
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.16em;
}
.card-brand-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #8cce75;
  border-radius: 6px;
  color: var(--green);
  font: 900 14px/1 system-ui;
}
.card-live {
  color: #7aa48b;
}
.challenge-card[data-state='ready'] .card-live,
.challenge-card[data-state='expired'] .card-live,
.challenge-card[data-state='failed'] .card-live {
  color: #92ae9b;
}
.challenge-card[data-state='ready'] .card-live-dot,
.challenge-card[data-state='expired'] .card-live-dot,
.challenge-card[data-state='failed'] .card-live-dot {
  background: #708a78;
  box-shadow: none;
}
.visual-stage {
  display: grid;
  min-height: 318px;
  place-items: center;
  margin-top: 9px;
}
.ready-placeholder {
  display: grid;
  place-items: center;
  width: 260px;
  height: 260px;
  border: 1px dashed #3e654d;
  border-radius: 16px;
  color: #7fb78e;
  background: radial-gradient(circle, #20462f 0, #10261b 59%, #0d2017 100%);
}
.ready-placeholder svg {
  width: 94px;
  height: 94px;
}
.challenge-card[data-state='preparing'] .ready-placeholder svg {
  animation: breathe 1.8s ease-in-out infinite;
}
.visual-stage:has(.qr-frame:not([hidden])) .ready-placeholder {
  display: none;
}
.qr-frame {
  position: relative;
  width: min(270px, 100%);
  aspect-ratio: 1;
  border-radius: 13px;
  background: #fff;
  box-shadow:
    0 0 0 8px #c4ffd00b,
    0 20px 42px #0006;
}
.qr-surface {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  padding: 12px;
  border-radius: inherit;
  background: #fff;
  transition:
    filter 300ms ease,
    opacity 300ms ease;
}
#qr {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
#qr svg,
#qr canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.qr-frame[data-state='connected'] .qr-surface,
.qr-frame[data-state='passkey'] .qr-surface,
.qr-frame[data-state='verifying'] .qr-surface,
.qr-frame[data-state='verified'] .qr-surface,
.qr-frame[data-state='failed'] .qr-surface,
.qr-frame[data-state='expired'] .qr-surface {
  filter: blur(12px) saturate(0.25) contrast(0.85);
}
.qr-frame[data-state='failed'] .qr-surface,
.qr-frame[data-state='expired'] .qr-surface {
  opacity: 0.64;
}
.qr-seal {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  border: 1px solid #4a8460;
  border-radius: inherit;
  background: #10281b91;
  color: var(--mint);
}
.qr-frame[data-state='connected'] .qr-seal,
.qr-frame[data-state='passkey'] .qr-seal,
.qr-frame[data-state='verifying'] .qr-seal {
  display: grid;
}
.qr-frame[data-state='verified'] .qr-seal {
  display: grid;
  border-color: #69e7ae88;
  background: #10281ba8;
}
.seal-icon {
  display: none;
  width: 112px;
  height: 112px;
}
.qr-frame[data-state='connected'] .seal-connected,
.qr-frame[data-state='passkey'] .seal-connected,
.qr-frame[data-state='verifying'] .seal-connected,
.qr-frame[data-state='verified'] .seal-verified {
  display: block;
}
.qr-refresh {
  display: flex;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 112px;
  height: 112px;
  border: 1px solid #9cffa9;
  border-radius: 50%;
  background: #0b241ceb;
  box-shadow: 0 8px 28px #0008;
  color: var(--mint);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}
.qr-refresh[hidden] {
  display: none;
}
.qr-refresh svg {
  width: 55px;
  height: 55px;
}
.qr-refresh span {
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qr-refresh:hover {
  background: #173c2bea;
  box-shadow: 0 10px 32px #000a;
}
.qr-refresh:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
.scan-corner {
  position: absolute;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid #a0e77b;
}
.scan-corner.top-left {
  top: -7px;
  left: -7px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
}
.scan-corner.top-right {
  top: -7px;
  right: -7px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 6px 0 0;
}
.scan-corner.bottom-left {
  bottom: -7px;
  left: -7px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 6px;
}
.scan-corner.bottom-right {
  bottom: -7px;
  right: -7px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 6px 0;
}
.challenge-message {
  text-align: center;
}
.challenge-message h2 {
  margin: 4px 0 3px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.challenge-message p {
  min-height: 43px;
  max-width: 350px;
  margin: 0 auto;
  color: #a7b9ac;
  font-size: 13px;
}
.challenge-message p[data-tone='pass'] {
  color: #b6f7c6;
}
.challenge-message p[data-tone='fail'] {
  color: #ffb5a8;
}
.connection-track {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 7px;
  align-items: center;
  max-width: 340px;
  margin: 27px auto 0;
  border-top: 1px solid #2b4738;
  padding-top: 18px;
}
.track-step {
  display: flex;
  min-width: 56px;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  color: #708678;
  font: 700 10px/1.2 var(--mono);
  letter-spacing: 0.04em;
}
.step-glyph {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #3e5948;
  border-radius: 50%;
  color: #829a89;
  font-size: 11px;
}
.track-step[data-state='active'] {
  color: #d9f3d2;
}
.track-step[data-state='active'] .step-glyph {
  border-color: var(--green);
  color: #0f2515;
  background: var(--green);
  box-shadow: 0 0 0 4px #b6f76c1b;
}
.track-step[data-state='done'] {
  color: #b8d8c2;
}
.track-step[data-state='done'] .step-glyph {
  border-color: #71d2a1;
  color: var(--mint);
}
.track-step[data-state='skipped'] {
  color: #708678;
}
.track-step[data-state='failed'] .step-glyph {
  border-color: var(--red);
  color: var(--red);
}
.track-line {
  height: 1px;
  background: #365240;
  transform: translateY(-9px);
}
.result-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin: 0 0 28px;
  padding: 22px 25px;
  border: 1px solid #3f7452;
  border-radius: 15px;
  background: #132a1d;
}
.result-card h2 {
  margin: 6px 0;
  font-size: 18px;
}
.result-card p:not(.eyebrow) {
  margin: 0;
  color: #b1c8b8;
  font-size: 13px;
}
.result-card details {
  font-size: 13px;
}
.result-card summary {
  color: var(--green);
  cursor: pointer;
}
.result-card dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 0;
}
.result-card dt {
  color: #92a99a;
}
.result-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.result-card code {
  font: 11px/1.4 var(--mono);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #ffffff13;
  padding-top: 18px;
  color: #6e8b77;
  font: 11px/1.5 var(--mono);
}
.footer span:first-child {
  color: #a2bea7;
  white-space: nowrap;
  letter-spacing: 0.08em;
}
.phone-shell {
  max-width: 860px;
}
.phone-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 32px;
  align-items: center;
  padding: 72px 0;
}
.phone-heading h1 {
  font-size: clamp(3.4rem, 7vw, 4.7rem);
}
.phone-heading .lead {
  font-size: 16px;
}
.phone-card {
  padding: 24px;
  border: 1px solid #315640;
  border-radius: 20px;
  background: linear-gradient(180deg, #162f20, #0b2016 25%);
  box-shadow: 0 25px 50px #0006;
}
.phone-visual {
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  margin: 15px auto 20px;
  border: 1px solid #3d7350;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #225638, #0e2518 67%);
  color: var(--mint);
}
.phone-visual svg {
  width: 100px;
  height: 100px;
}
.phone-passkey-art,
.phone-check-art,
.phone-fail-art {
  display: none;
}
.phone-card[data-state='passkey'] .phone-line-art {
  display: none;
}
.phone-card[data-state='passkey'] .phone-passkey-art {
  display: block;
}
.phone-card[data-state='complete'] .phone-line-art,
.phone-card[data-state='failed'] .phone-line-art {
  display: none;
}
.phone-card[data-state='complete'] .phone-check-art,
.phone-card[data-state='failed'] .phone-fail-art {
  display: block;
}
.phone-card[data-state='complete'] .phone-visual {
  background: radial-gradient(circle, #23673c, #123d24 72%);
  border-color: var(--mint);
}
.phone-card[data-state='failed'] .phone-visual {
  color: var(--red);
  background: radial-gradient(circle, #4c2a22, #251a17 72%);
  border-color: var(--red);
}
.phone-card[data-state='checking'] .phone-visual {
  animation: breathe 1.8s ease-in-out infinite;
}
.phone-card .primary-button {
  margin-top: 23px;
}
.passkey-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 23px;
}
.passkey-actions[hidden] {
  display: none;
}
.passkey-actions .primary-button {
  margin-top: 0;
}
.passkey-secondary {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid #49745a;
  border-radius: 10px;
  background: #0b2116;
  color: #d0ead7;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.passkey-secondary:hover:not(:disabled) {
  border-color: var(--mint);
  color: var(--mint);
}
.passkey-secondary:disabled {
  cursor: wait;
  opacity: 0.55;
}
.phone-card .connection-track {
  margin-top: 25px;
}
@keyframes breathe {
  50% {
    box-shadow: 0 0 0 12px #69e7ae16;
    transform: scale(1.03);
  }
}
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 45px;
  }
  .intro {
    max-width: 680px;
  }
  .challenge-card {
    max-width: 530px;
    width: 100%;
    margin: 0 auto;
  }
  .phone-main {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 0;
    gap: 18px;
    align-content: start;
  }
}
@media (max-width: 560px) {
  .shell {
    padding: 20px 18px 24px;
  }
  .topbar {
    padding-bottom: 17px;
  }
  .topbar-note {
    font-size: 9px;
  }
  .layout {
    padding-top: 38px;
    gap: 27px;
  }
  h1 {
    margin-top: 14px;
    font-size: clamp(3.1rem, 13vw, 4.2rem);
  }
  .lead {
    margin-bottom: 24px;
    font-size: 15px;
  }
  .setup-card {
    padding: 17px;
  }
  .challenge-card {
    min-height: 550px;
    padding: 18px 16px;
  }
  .visual-stage {
    min-height: 300px;
  }
  .qr-frame,
  .ready-placeholder {
    width: min(245px, 80vw);
  }
  .ready-placeholder {
    height: min(245px, 80vw);
  }
  .result-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .footer {
    flex-direction: column;
    gap: 5px;
  }
  .phone-main {
    padding: 24px 0;
    gap: 16px;
  }
  .phone-shell {
    padding-inline: 12px;
  }
  .phone-heading h1 {
    margin: 0 0 12px;
    font-size: clamp(2.7rem, 11vw, 3.3rem);
  }
  .phone-heading .lead {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
  }
  .phone-card {
    padding: 18px;
  }
  .phone-visual {
    width: 140px;
    height: 140px;
    margin: 6px auto 14px;
  }
  .phone-visual svg {
    width: 80px;
    height: 80px;
  }
  .phone-card .primary-button {
    margin-top: 16px;
  }
  .passkey-actions {
    margin-top: 16px;
  }
  .phone-card .connection-track {
    margin-top: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
