:root {
  color-scheme: dark;
  --ink: #08090b;
  --panel: #101317;
  --raised: #15191e;
  --line: #292e35;
  --line-strong: #3a424b;
  --text: #f3f5f0;
  --muted: #a2a8a4;
  --quiet: #70777d;
  --signal: #d8ff12;
  --signal-hover: #e3ff4d;
  --success: #53d982;
  --warning: #f4bf4f;
  --danger: #ff6b78;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -14rem, rgb(216 255 18 / 7%), transparent 37rem),
    var(--ink);
}

a,
button,
input {
  font: inherit;
}

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

button {
  appearance: none;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--signal);
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 74px;
  margin: 0 auto;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
}

.wordmark-text {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.075em;
}

.wordmark-accent {
  color: var(--signal);
}

.product-name {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.03em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: #08090b;
  background: var(--signal);
  border-color: var(--signal);
}

.primary-button:hover {
  background: var(--signal-hover);
  border-color: var(--signal-hover);
}

.ghost-button,
.secondary-button {
  color: var(--text);
  background: transparent;
  border-color: var(--line-strong);
}

.ghost-button:hover,
.secondary-button:hover {
  background: var(--raised);
  border-color: var(--muted);
}

.account {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.account-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.account-avatar {
  display: grid;
  position: relative;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  color: var(--ink);
  background: var(--signal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--raised);
  object-fit: cover;
}

.account-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.account-copy strong,
.account-copy span {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.account-copy span {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 11px;
}

.account form {
  margin: 0;
}

.logout-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

.header-login {
  min-height: 38px;
}

.home-content {
  display: flex;
  justify-content: center;
  padding: 0 24px 72px;
}

.home-stage {
  width: min(960px, 100%);
  padding-top: clamp(76px, 10vw, 126px);
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  margin: 0 0 18px;
  color: var(--signal);
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.lead {
  max-width: 680px;
  margin: 25px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.58;
}

.hero-register {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--quiet);
  font-size: 12px;
}

.hero-register::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  content: "";
  box-shadow: 0 0 0 4px rgb(83 217 130 / 10%);
}

.notice {
  max-width: 680px;
  margin: 26px auto 0;
  padding: 13px 15px;
  border: 1px solid rgb(255 107 120 / 45%);
  border-radius: 10px;
  color: #ffc6cb;
  background: rgb(255 107 120 / 7%);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 66px;
}

.platform-card {
  display: flex;
  min-width: 0;
  min-height: 298px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.platform-card:not(.is-disabled):hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.platform-card.is-disabled {
  background: rgb(16 19 23 / 65%);
}

.platform-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.platform-code {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--signal);
  background: var(--raised);
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--ink);
  font-size: 11px;
  font-weight: 680;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}

.status-ready::before {
  background: var(--success);
}

.status-wait::before {
  background: var(--warning);
}

.platform-card h2 {
  margin: 24px 0 7px;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.platform-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.platform-card > p.release-warning {
  margin-top: 14px;
  color: var(--warning);
  font-size: 12px;
}

.release-meta {
  display: flex;
  min-height: 40px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--quiet);
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
}

.download {
  width: 100%;
  margin-top: 17px;
}

.download-arrow {
  margin-left: auto;
  font-size: 17px;
  line-height: 0;
}

.button.disabled {
  color: var(--quiet);
  background: var(--raised);
  border-color: var(--line);
  cursor: not-allowed;
}

.button.disabled:hover {
  transform: none;
}

.device-content {
  display: flex;
  min-height: calc(100vh - 74px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.device-panel {
  width: min(660px, 100%);
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.device-panel h1 {
  margin-top: 0;
  font-size: clamp(36px, 6vw, 58px);
}

.device-panel .lead {
  margin: 20px 0 0;
  font-size: 17px;
}

.device-panel .notice {
  margin: 0 0 24px;
}

.device-code {
  display: inline-flex;
  margin: 30px 0 8px;
  padding: 13px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--signal);
  background: var(--ink);
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.device-panel form:not(.device-form) {
  max-width: 420px;
  margin-inline: auto;
}

.device-form {
  display: grid;
  max-width: 430px;
  gap: 10px;
  margin-top: 30px;
}

.device-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.device-form input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: var(--ink);
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.device-form input:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgb(216 255 18 / 10%);
}

.device-state {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 25px;
  border: 1px solid rgb(83 217 130 / 35%);
  border-radius: 12px;
  font-size: 25px;
  font-weight: 900;
}

.success-state {
  color: var(--success);
  background: rgb(83 217 130 / 8%);
}

.device-back {
  margin-top: 28px;
}

@media (min-width: 721px) and (max-height: 950px) {
  .home-content {
    padding-bottom: 24px;
  }

  .home-stage {
    padding-top: 32px;
  }

  .kicker {
    margin-bottom: 12px;
  }

  h1 {
    font-size: clamp(42px, 4.8vw, 64px);
  }

  .lead {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.45;
  }

  .hero-register {
    margin-top: 12px;
  }

  .platforms {
    margin-top: 30px;
  }

  .platform-card {
    min-height: 238px;
    padding: 20px;
  }

  .platform-code {
    width: 40px;
    height: 40px;
  }

  .platform-card h2 {
    margin: 16px 0 5px;
    font-size: 24px;
  }

  .release-meta {
    min-height: 32px;
    padding-top: 15px;
  }

  .download {
    margin-top: 12px;
  }

}

@media (max-width: 720px) {
  .app-header {
    width: min(100% - 28px, 1180px);
  }

  .account-copy {
    display: none;
  }

  .platforms {
    grid-template-columns: 1fr;
    margin-top: 46px;
  }

  .home-stage {
    padding-top: 64px;
  }

  .platform-card {
    min-height: 282px;
  }
}

@media (max-width: 470px) {
  .app-header {
    min-height: 66px;
    gap: 12px;
  }

  .wordmark-text {
    font-size: 21px;
  }

  .product-name {
    margin-left: 10px;
    padding-left: 10px;
  }

  .account {
    gap: 7px;
  }

  .account-avatar {
    width: 31px;
    height: 31px;
  }

  .logout-button {
    padding: 7px 9px;
  }

  .home-content,
  .device-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .device-content {
    min-height: calc(100vh - 66px);
  }

  .home-stage {
    padding-top: 52px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .platform-card {
    padding: 21px;
  }

  .release-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

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