:root {
  --black: #020205;
  --deep: #070811;
  --ink: #f4f1ea;
  --muted: rgba(244, 241, 234, .76);
  --soft: rgba(244, 241, 234, .56);
  --lime: #97d61f;
  --teal: #39b9a8;
  --violet: #a36aff;
  --line: rgba(244, 241, 234, .16);
  --line-soft: rgba(244, 241, 234, .09);
  --danger: #ff8c8c;
  --max: 980px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 12%, rgba(163, 106, 255, .10), transparent 28rem),
    radial-gradient(circle at 12% 90%, rgba(88, 213, 201, .08), transparent 26rem),
    var(--black);
  color: var(--ink);
  font-family: Optima, "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", Helvetica, Arial, sans-serif;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); }
a:hover, a:focus-visible { color: white; }

.shell {
  width: min(100% - 42px, var(--max));
  margin: 0 auto;
}

.masthead {
  padding: 50px 0 24px;
  border-bottom: 1px solid rgba(183, 232, 143, .22);
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: 42px auto 42px;
  gap: 12px;
  align-items: center;
  color: var(--lime);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .20em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: .78;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  margin-top: 20px;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  letter-spacing: -.035em;
}

h2 {
  font-size: clamp(1.45rem, 3.2vw, 2.25rem);
  letter-spacing: -.025em;
}

h3 { font-size: 1.18rem; }

.subtitle {
  margin: 12px 0 0;
  color: var(--lime);
  font-size: clamp(1.12rem, 2.5vw, 1.55rem);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.nav a {
  color: rgba(244, 241, 234, .88);
  font-size: .79rem;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}

main { padding: 58px 0 72px; }

.deco-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 42px;
  color: var(--lime);
}

.deco-line::before,
.deco-line::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 232, 143, .54), transparent);
}

.deco-line span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--lime);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(183, 232, 143, .45);
}

.lead {
  color: rgba(244, 241, 234, .92);
  font-size: 1.08rem;
}

p { color: var(--muted); }

.section {
  padding: 30px 0;
  border-top: 1px solid var(--line-soft);
}

.section:first-of-type { border-top-color: rgba(183, 232, 143, .26); }

.section h2,
.section h3 { margin-bottom: 14px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 24px;
}

.button,
button {
  appearance: none;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid rgba(151, 214, 31, .52);
  border-radius: 0;
  background: rgba(151, 214, 31, .06);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible,
button:hover,
button:focus-visible {
  border-color: var(--lime);
  background: rgba(151, 214, 31, .12);
  outline: none;
}

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

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

.auth-panel {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.auth-panel.full { grid-column: 1 / -1; }

form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .95rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
  font: inherit;
}

input,
select { min-height: 46px; }

textarea { min-height: 120px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lime);
  outline: 1px solid rgba(151, 214, 31, .24);
}

fieldset {
  margin: 8px 0;
  padding: 20px;
  border: 1px solid var(--line);
}

legend { padding: 0 8px; color: var(--lime); }

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

.check-label {
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.check-label input { width: 18px; min-height: 18px; margin-top: 4px; }

.fine { color: var(--soft); font-size: .9rem; }

.status {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--muted);
}

.status[data-kind="success"] { color: var(--lime); }
.status[data-kind="error"] { color: var(--danger); }

.account-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.account-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.account-item strong { display: block; margin-bottom: 8px; font-weight: 500; }

[hidden] { display: none !important; }

footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: .9rem;
}

@media (max-width: 720px) {
  .shell { width: min(100% - 30px, var(--max)); }
  .masthead { padding-top: 36px; }
  .brand-mark { grid-template-columns: 24px auto 24px; gap: 8px; }
  main { padding-top: 38px; }
  .auth-grid, .account-list, .form-grid { grid-template-columns: 1fr; }
  .auth-panel.full { grid-column: auto; }
  .actions { align-items: stretch; flex-direction: column; }
  .button, button { width: 100%; }
}

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