:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ground: #101920;
  --ground-2: #141f27;
  --ink: #edf2f3;
  --muted: #9aa9b0;
  --muted-2: #9aa9b0;
  --teal: #60d3bf;
  --line: #293740;
  --error: #ff8880;
  --signal: #9edbd2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
}

body:before, body:after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body:before {
  width: 560px;
  height: 560px;
  top: -300px;
  right: -180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(54 117 114 / .16), transparent);
  filter: blur(30px);
}

body:after {
  left: 27px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, rgb(121 160 165 / .15) 14%, rgb(121 160 165 / .15) 86%, transparent);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
::selection { background: var(--teal); color: #0a1a1c; }

.shell {
  max-width: 1280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 clamp(38px, 7vw, 104px);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 90px;
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .15em;
}

.brand-mark {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.brand-mark i { display: block; width: 3px; border-radius: 2px; background: var(--teal); }
.brand-mark i:nth-child(1) { height: 10px; opacity: .62; }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-mark i:nth-child(3) { height: 14px; opacity: .8; }

.server-status { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; letter-spacing: .025em; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #8b9aa1; }
.server-status[data-state="ready"] .status-light { background: #68d7ba; }
.server-status[data-state="offline"] .status-light { background: #ef8a7c; }

.entry {
  position: relative;
  width: min(100%, 456px);
  margin: auto auto;
  padding: 86px 0 74px;
}

.section-label {
  margin: 0 0 19px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 650;
  letter-spacing: -.075em;
  line-height: 1.08;
}

h1 span { color: var(--teal); }
.intro { margin: 21px 0 39px; color: var(--muted); font-size: 15px; line-height: 1.7; }
label { display: block; margin: 0 0 9px; color: #dbe4e7; font-size: 13px; font-weight: 600; }

.code-field {
  position: relative;
  border: 1px solid #41515b;
  border-radius: 4px;
  background: var(--ground-2);
  transition: border-color .15s ease, background .15s ease;
}

.code-field:focus-within { border-color: #8bccbf; background: #19272e; }
.code-field input { width: 100%; height: 55px; padding: 0 57px 0 16px; border: 0; border-radius: inherit; outline: 0; background: transparent; color: var(--ink); font-size: 15px; letter-spacing: .13em; }
.code-field input::placeholder { color: var(--muted-2); letter-spacing: .035em; }
.code-field input[aria-invalid="true"] { color: var(--error); }

.reveal {
  position: absolute;
  inset: 0 0 0 auto;
  width: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.reveal:hover { color: var(--ink); }
.reveal svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.button {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.button:active { transform: translateY(1px); }
.button svg { flex: 0 0 20px; width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { margin-top: 13px; background: var(--teal); color: #0d2122; font-size: 14px; font-weight: 750; }
.button-primary:hover { background: #76dfcd; }
.button-primary:disabled { cursor: wait; opacity: .65; }
.button-buy { min-height: 48px; margin-top: 10px; padding: 0 16px; border-color: var(--line); background: transparent; color: #c4d0d3; font-size: 13px; font-weight: 600; }
.button-buy svg { width: 17px; height: 17px; color: #8da3aa; }
.button-buy:hover { border-color: #60757b; color: var(--ink); }

.form-message { min-height: 20px; margin: 11px 0 0; color: var(--error); font-size: 12px; line-height: 1.55; }
.form-message[data-state="success"] { color: var(--teal); }
.form-message[data-state="loading"] { color: var(--muted); }

.footer { height: 66px; flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; letter-spacing: .035em; }

.buy-dialog { width: min(calc(100vw - 38px), 390px); padding: 32px; border: 0; border-radius: 6px; background: #17232b; color: var(--ink); box-shadow: 0 28px 90px rgb(0 0 0 / .48); }
.buy-dialog::backdrop { background: rgb(3 9 12 / .77); }
.dialog-mark, .account-check { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; background: rgb(96 211 191 / .12); color: var(--teal); }
.dialog-mark span, .dialog-mark span::after { display: block; width: 3px; background: currentColor; }
.dialog-mark span { height: 13px; position: relative; }
.dialog-mark span::after { content: ""; position: absolute; top: 0; left: 7px; height: 8px; }
.buy-dialog h2, .account h2 { margin: 21px 0 9px; font-size: 25px; font-weight: 650; letter-spacing: -.045em; }
.buy-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.dialog-close { margin-top: 24px; }

.account { border-top: 1px solid var(--line); padding-top: 28px; }
.account-check { width: 42px; height: 42px; }
.account-check svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account h2 { margin-top: 8px; }
.account-expiry { margin: 0; color: var(--muted); font-size: 13px; }
.download { margin-top: 27px; }
.exit-button { display: block; margin: 17px auto 0; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.exit-button:hover { color: var(--ink); }

@media (max-width: 600px) {
  body:after { left: 15px; }
  .shell { padding: 0 27px; }
  .topbar { height: 72px; }
  .server-status { font-size: 11px; }
  .entry { padding: 62px 0 54px; }
  h1 { font-size: clamp(45px, 12vw, 58px); }
  .intro { margin: 17px 0 31px; font-size: 14px; }
}

@media (max-height: 680px) and (min-width: 601px) {
  .entry { padding: 42px 0; }
  .intro { margin-bottom: 24px; }
  .footer { height: 52px; }
}

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