:root {
  --bg: #080810;
  --surface: #101018;
  --line: #2c3448;
  --text: #d8e0ea;
  --muted: #8a96a8;
  --accent: #5fd0c0;
  --font: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --w: 36rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  position: relative;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(88px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
}

.glow--a {
  width: min(28rem, 75vw);
  height: min(28rem, 75vw);
  top: -6rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(95, 208, 192, 0.22) 0%, transparent 68%);
}

.glow--b {
  width: min(24rem, 65vw);
  height: min(24rem, 65vw);
  right: -4rem;
  bottom: 18%;
  background: radial-gradient(circle, rgba(31, 95, 102, 0.22) 0%, transparent 70%);
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 6.75rem;
}

.auth-home {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.auth-home:hover {
  text-decoration: none;
}

.top nav {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

nav a {
  color: var(--muted);
  font-size: 0.8125rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand strong {
  font-weight: 500;
}

.mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  background: linear-gradient(135deg, #1f5f66 0%, #123e44 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mark--auth {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 55%, #10b981 100%);
  font-size: 0.72rem;
}

main {
  flex: 1;
  display: grid;
  place-items: start center;
  width: 100%;
  padding: 2rem 1.25rem 3rem;
}

.sheet {
  width: min(100%, var(--w));
}

.hidden {
  display: none !important;
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.actions {
  display: grid;
  gap: 0.65rem;
}

.btn {
  display: block;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.7rem 1rem;
  font: 500 0.9375rem/1 var(--font);
  cursor: pointer;
  background: var(--accent);
  color: #080810;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.pane {
  border: 1px solid var(--line);
  background: rgba(16, 16, 24, 0.72);
  padding: 1rem 1.05rem 1.1rem;
  margin: 0 0 0.85rem;
}

.pane h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.kv {
  display: grid;
  grid-template-columns: 8.2rem 1fr auto;
  gap: 0.45rem 0.7rem;
  align-items: center;
}

.kv span {
  color: var(--muted);
  font-size: 0.75rem;
}

.kv code {
  font: inherit;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  color: var(--text);
}

.copy {
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
}

.hint {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

#regen-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 10, 0.72);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem 1.05rem 1.15rem;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.modal-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-x {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
}

.modal-card .btn {
  margin-top: 1rem;
  width: 100%;
}

#regen-err {
  color: #f0a0a0;
}

.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.foot a {
  color: inherit;
  text-decoration: none;
}

.foot a:hover {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 640px) {
  .top {
    padding: 0.75rem 1rem 3.2rem;
  }

  .auth-home,
  .top nav {
    position: static;
    transform: none;
  }

  .top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 0.75rem;
    justify-content: stretch;
  }

  .brand {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .copy {
    justify-self: start;
  }
}
