:root {
  color-scheme: dark;
  --bg: #0b1418;
  --bg-2: #0f1c21;
  --glow: rgba(79, 216, 207, 0.28);
  --text: #ffffff;
  --muted: #c6c6c6;
  --faint: #8d8d8d;
  --line: #2a2a2a;
  --field: #0a0a0a;
  --cyan: #7ee3dd;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px 56px;
  background:
    radial-gradient(760px 520px at 50% -10%, rgba(79, 216, 207, 0.10), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
}

main { width: 100%; max-width: 480px; }

body.top { place-items: start center; }

header { margin-bottom: 28px; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin: 0;
  color: var(--text);
}

.mark {
  display: block;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.wordmark {
  font-size: clamp(32px, 8vw, 40px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 22px 0 12px;
  color: var(--text);
}

h2 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}

p { line-height: 1.6; color: var(--muted); }

.card {
  margin-top: 8px;
  padding: 22px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #eeeeee;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #333333;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--text);
  background: var(--field);
}

button {
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

button.secondary {
  background: transparent;
  color: #f2f2f2;
  border-color: #3a3a3a;
}

button:disabled { opacity: .45; cursor: wait; }

button:hover:not(:disabled) { background: #f2f2f2; }

button.secondary:hover:not(:disabled) {
  background: #141414;
  border-color: #5a5a5a;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.wide { width: 100%; }

#connect { width: 100%; }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.note { font-size: 13px; color: var(--faint); margin-bottom: 0; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  margin: 22px 0 6px;
}

#client-name { font-size: 24px; margin: 0 0 8px; color: var(--text); }

#redirect,
#permissions,
#signed-in { color: #f3f3f3; }

#redirect,
#permissions,
#endpoint {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 14px;
}

#endpoint {
  display: block;
  margin: 8px 0 12px;
  padding: 12px 14px;
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #e8e8e8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: #e8e8e8;
}

#message:empty { display: none; }

#message {
  padding: 14px 16px;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  background: #111111;
  color: #e8e8e8;
  line-height: 1.5;
  font-size: 14px;
  margin-bottom: 20px;
}

.error {
  background: #1a1010 !important;
  border-color: #6e3030 !important;
  color: #ffc9bf !important;
}

#account { margin-top: 20px; }

#signed-in { font-size: 14px; margin-top: 0; }

footer {
  font-size: 13px;
  margin-top: 28px;
  color: var(--faint);
  line-height: 1.7;
}

a { color: var(--muted); text-underline-offset: 3px; overflow-wrap: anywhere; }

.doc h2 { margin-top: 28px; }

a:hover { color: var(--cyan); }

[hidden] { display: none !important; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

::selection { background: #14524e; color: #ffffff; }

@media (max-width: 440px) {
  body { padding: 32px 20px 40px; }
  .actions button { flex: 1; }
}

/* Animated logo mark (landing page). Ported from the redesign; CSS only. */
.lens-mark {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(160deg, #1a2a30, #0c171b);
  border: 1px solid #22383f;
  box-shadow: 0 0 0 6px rgba(79, 216, 207, 0.04), 0 10px 30px rgba(0, 0, 0, 0.4);
}
.lens-mark svg { width: 54px; height: 54px; filter: drop-shadow(0 0 8px var(--glow)); }
.pulse-line { stroke-dasharray: 120; stroke-dashoffset: 120; animation: trace 2.4s ease-in-out infinite; }
@keyframes trace {
  0% { stroke-dashoffset: 120; }
  45%, 70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}
.ring { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pulse-line, .ring { animation: none; }
  .pulse-line { stroke-dashoffset: 0; }
}
.doc li { color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
