:root {
  --bg-0: #07131f;
  --bg-1: #0c1f30;
  --ink: #e8f2f8;
  --muted: #8aa3b5;
  --line: rgba(140, 190, 210, 0.18);
  --cyan: #35d0c5;
  --amber: #f0b429;
  --rose: #ff6b6b;
  --mint: #9af0d8;
  --panel: rgba(10, 28, 42, 0.78);
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(53, 208, 197, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(240, 180, 41, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 55%, #081722);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 180, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 200, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 40vw;
  height: 40vw;
  top: 20%;
  left: 30%;
  background: radial-gradient(circle, rgba(53, 208, 197, 0.08), transparent 70%);
  filter: blur(40px);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes drift {
  from {
    transform: translate(-8%, -4%) scale(1);
  }
  to {
    transform: translate(10%, 8%) scale(1.15);
  }
}

.topbar,
.layout,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0.75rem;
  display: grid;
  gap: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--ink);
  border-color: rgba(53, 208, 197, 0.45);
  transform: translateX(-2px);
}

.brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.brand-mark {
  width: 14px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--cyan));
  box-shadow: 0 0 24px rgba(53, 208, 197, 0.45);
  animation: breathe 2.8s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: scaleY(0.92);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.lead {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(53, 208, 197, 0.35);
  background: rgba(53, 208, 197, 0.1);
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #102018;
  background: linear-gradient(135deg, var(--amber), #ffd978);
}

.btn.primary.flash {
  animation: btnFlash 0.45s ease;
}

@keyframes btnFlash {
  0% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.35);
  }
  100% {
    filter: brightness(1);
  }
}

.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.status {
  margin: 0.9rem 0 0;
  min-height: 2.8em;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.status.alert {
  color: #ffd4a8;
}

.status.success {
  color: var(--mint);
}

.footnote {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.footer {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 560px) {
  .topbar,
  .layout,
  .footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
