:root {
  --bg: #0b1017;
  --bg-2: #121a24;
  --ink: #eef3f8;
  --muted: #8fa0b3;
  --brand: #2fd6c0;
  --brand-ink: #04221d;
  --line: #243142;
  --line-strong: #334556;
  --field: #0e151e;
  --danger: #ff7b84;
  --focus: color-mix(in srgb, var(--brand) 55%, transparent);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Sora", "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 8% -8%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 58%),
    radial-gradient(700px 420px at 92% 8%, color-mix(in srgb, #4d7cff 12%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 42%, #080c12 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 32px 20px 88px;
  animation: rise 0.55s var(--ease) both;
}

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

.brand {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.78rem;
}

.brand-mark {
  display: block;
  font-size: clamp(1.85rem, 5.5vw, 2.55rem);
  letter-spacing: 0.16em;
  margin: 0;
  line-height: 1;
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 20px 0 56px;
}

.hero .lede {
  margin: 0;
  max-width: 34ch;
  font-size: 1.02rem;
}

.tagline {
  margin: 0;
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  max-width: 16ch;
}

h1 {
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.035em;
  font-weight: 600;
}

h2 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 650;
}

h3 {
  margin: 22px 0 10px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 560;
}

.lede, .muted { color: var(--muted); line-height: 1.5; }
.tiny { margin: 0; font-size: 0.8rem; letter-spacing: 0.02em; }
.error {
  color: var(--danger);
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.actions, .top, .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.top {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.step-track {
  display: flex;
  gap: 5px;
  width: 52px;
}

.step-track i {
  display: block;
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: var(--line);
}

.step-track i.on {
  background: var(--brand);
}

.dash { display: grid; gap: 0; }

.section {
  padding: 30px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.section:last-child { border-bottom: 0; }

.section > .muted {
  margin: 0 0 16px;
  max-width: 46ch;
  font-size: 0.95rem;
}

form.stack,
.section form,
.auth form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.row-form label { flex: 1 1 160px; }

.phone-row {
  display: grid;
  grid-template-columns: minmax(7.4rem, 10.5rem) minmax(0, 1fr);
  gap: 8px;
}

.phone-row select {
  padding-right: 0.4rem;
}

@media (max-width: 420px) {
  .phone-row { grid-template-columns: 1fr; }
}

label {
  display: grid;
  gap: 7px;
  width: 100%;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}

label.check {
  display: flex;
  gap: 8px;
  align-items: center;
  width: auto;
}

.checks {
  display: grid;
  gap: 8px;
  margin: 0 0 4px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 0.98rem;
  background: var(--field);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

input::placeholder, textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

input:hover, textarea:hover {
  border-color: var(--line-strong);
}

input:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 70%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
  background: color-mix(in srgb, var(--field) 88%, #000);
}

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

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.btn.primary:hover {
  background: color-mix(in srgb, var(--brand) 88%, #fff);
}

.btn.ghost {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--field) 70%, transparent);
}

.btn.ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.btn.small {
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
}

.btn.google {
  width: 100%;
  gap: 10px;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.auth form .btn.primary {
  margin-top: 6px;
  width: 100%;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  font-size: 0.95rem;
}

.list li:last-child { border-bottom: 0; }

.inline { display: inline; margin: 0; }

.plugin {
  padding: 14px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.plugin:first-of-type { border-top: 0; }

.plugin summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.plugin summary::-webkit-details-marker { display: none; }

.plugin summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  color: var(--brand);
}

.plugin[open] summary::before { content: "–"; }

.plugin .muted { margin: 8px 0 12px; font-size: 0.9rem; }

.token, .code {
  margin: 0 0 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 92%, var(--brand));
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
}

.auth {
  padding-top: 8px;
  max-width: 420px;
}

.auth > .muted {
  margin: 0 0 22px;
  max-width: 38ch;
  font-size: 0.98rem;
}

.auth form + .muted {
  margin-top: 20px;
  text-align: center;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  width: auto;
  background: var(--field);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.choice:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.choice input {
  width: auto;
  accent-color: var(--brand);
  box-shadow: none;
}

.choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand) 60%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--field));
}

.reveal h3 { margin-top: 22px; }

@media (max-width: 520px) {
  .shell { padding: 22px 16px 72px; width: min(100%, 100%); }
  .top { align-items: flex-start; }
  .auth { max-width: none; }
  .btn { width: auto; }
  .auth form .btn.primary,
  .row-form .btn { width: 100%; }
  .choice-grid { grid-template-columns: 1fr; }
  .hero { min-height: calc(100vh - 48px); }
}
