@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #10131a;
  --surface: #171b24;
  --surface-2: #1f2530;
  --border: #262c38;
  --text: #e7e9ee;
  --text-dim: #8b93a3;
  --accent: #e8a33d;
  --accent-2: #52d6b5;
  --danger: #e85d5d;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.brand, h1, h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

code, .mono { font-family: 'IBM Plex Mono', monospace; }

.center-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
}

.login-card { max-width: 340px; text-align: center; }
.setup-card { max-width: 420px; text-align: left; }
.confirm-card { max-width: 380px; text-align: center; }

/* Signature element: a quiet pulse/signal line, standing in for
   "tracking a signal over time" — the whole point of the app. */
.pulse-line {
  width: 100%;
  height: 34px;
  margin: 0 auto 20px;
  display: block;
}
.pulse-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw-pulse 2.4s ease-in-out infinite;
}
@keyframes draw-pulse {
  0%   { stroke-dashoffset: 240; opacity: 0.35; }
  55%  { stroke-dashoffset: 0;   opacity: 1; }
  100% { stroke-dashoffset: -240; opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-line path { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

.login-title { font-size: 1.5rem; color: var(--text); }
.login-sub { color: var(--text-dim); margin: 6px 0 26px; font-size: 0.9rem; }

.stack-form input[type="text"],
.stack-form input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 14px;
}
.stack-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  width: 100%;
  padding: 13px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #1a1305;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 16px;
}

.hint { color: var(--text-dim); font-size: 0.85rem; margin: 18px 0 8px; }
.hash-box {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 8px;
  word-break: break-all;
  font-size: 0.82rem;
  color: var(--accent-2);
}
.warn { color: var(--accent); font-size: 0.8rem; margin-top: 22px; }

/* ---------- Confirmation page ---------- */
.check-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-mark svg { width: 26px; height: 26px; stroke: var(--accent-2); }

.confirm-title { font-size: 1.4rem; }
.confirm-sub { color: var(--text-dim); font-size: 0.9rem; margin: 10px 0 28px; line-height: 1.5; }

.signout-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid transparent;
}
.signout-link:hover { color: var(--text); border-color: var(--border); }
