:root {
  color-scheme: light;
  --ink: #1b1a17;
  --muted: #6f675a;
  --accent: #0b8a7b;
  --accent-dark: #0a6f63;
  --accent-soft: #d7f3ef;
  --highlight: #f2b335;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --border: rgba(27, 26, 23, 0.1);
  --shadow: 0 18px 50px rgba(27, 26, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fff3d9 0%, #f4efe6 38%, #e7f1ee 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.45;
}

body::before {
  background: radial-gradient(circle, rgba(11, 138, 123, 0.4), transparent 70%);
  top: -120px;
  right: -80px;
  animation: drift 18s ease-in-out infinite;
}

body::after {
  background: radial-gradient(circle, rgba(242, 179, 53, 0.35), transparent 70%);
  bottom: -120px;
  left: -60px;
  animation: drift 20s ease-in-out infinite reverse;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-18px, 18px);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.7);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-mark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.connection-chip {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(27, 26, 23, 0.08);
  color: var(--muted);
  font-weight: 600;
}

.connection-chip.success {
  background: rgba(11, 138, 123, 0.15);
  color: var(--accent-dark);
}

.connection-chip.warning {
  background: rgba(242, 179, 53, 0.2);
  color: #a16505;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 44px;
  margin: 8px 0 16px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin: 0;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.primary,
.ghost {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 22px rgba(11, 138, 123, 0.2);
}

.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid rgba(11, 138, 123, 0.25);
}

.ghost:hover {
  background: rgba(11, 138, 123, 0.1);
}

.ghost.small {
  padding: 6px 12px;
  font-size: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.hero-card .chip {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 138, 123, 0.15);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card h3 {
  margin-top: 0;
}

.note {
  font-size: 12px;
  color: var(--muted);
}

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

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}

.stack {
  display: grid;
  gap: 14px;
}

.dashboard {
  display: grid;
  gap: 24px;
}

.dashboard-header,
.settings-header,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.action-row {
  flex-wrap: wrap;
}

.notice {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  background: rgba(27, 26, 23, 0.05);
  color: var(--muted);
  display: none;
}

.notice.visible {
  display: block;
}

.notice[data-variant="error"] {
  background: rgba(190, 45, 45, 0.15);
  color: #9c1b1b;
}

.notice[data-variant="success"] {
  background: rgba(11, 138, 123, 0.15);
  color: var(--accent-dark);
}

.notice[data-variant="warning"] {
  background: rgba(242, 179, 53, 0.2);
  color: #9b6406;
}

.callback {
  display: flex;
  gap: 20px;
  align-items: center;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(27, 26, 23, 0.15);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.token {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  word-break: break-all;
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 13px;
}

[data-animate] {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

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

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }
}

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