:root {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #e0e0e0;
  --muted: #888;
  --accent: #90caf9;
  --danger: #ef5350;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Card column between the shared site header/footer */
main { width: 100%; max-width: 520px; padding: 32px 20px; margin: 0 auto; flex: 1 0 auto; }

.page-intro { margin-bottom: 24px; }
.page-intro h1 { margin: 0; font-size: 26px; color: #fff; }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* Sign-out lives in the shared site nav — override the generic button styles */
.site-nav #signout {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
}
.site-nav #signout:hover { border-color: var(--muted); color: var(--text); }

section {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #2a2a2a;
  color: var(--text);
  font-size: 15px;
}

/* Email chip editor — replaces the comma-separated recipients input. The wrap
   styles itself like an input; the inner entry is borderless. */
.chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #2a2a2a;
  cursor: text;
}
.chip-input.chip-input-error { border-color: #e05a4e; }
.chip-input .chip-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: rgba(144, 202, 249, 0.16);
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
}
.chip-input .chip-x {
  width: auto;
  padding: 0 4px;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.7;
}
.chip-input .chip-x:hover { opacity: 1; }
.chip-input .chip-entry {
  flex: 1;
  width: auto;
  min-width: 160px;
  margin: 0;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.chip-input .chip-entry:focus { outline: none; }

textarea {
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 84px;
}

.controls { display: flex; gap: 12px; margin-top: 20px; }

button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  background: #333;
  color: var(--text);
}
button.primary { background: var(--accent); color: #000; font-weight: 600; }
button.danger { background: var(--danger); color: #fff; font-weight: 600; }
button.ghost-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}
button.notes-only {
  width: 100%;
  margin-top: 16px;
  background: transparent;
  border: 1px dashed #444;
  color: var(--muted);
  font-size: 14px;
}
button.notes-only:hover { color: var(--text); border-color: var(--muted); }
button.ghost {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.timer {
  margin-top: 20px;
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--danger);
}

.stage { color: var(--accent); margin: 12px 0; }

progress { width: 100%; height: 8px; }

pre {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.6;
  background: #2a2a2a;
  padding: 16px;
  border-radius: 8px;
}

.error { color: var(--danger); font-size: 14px; }

.magic-link { margin-top: 20px; border-top: 1px solid #333; padding-top: 12px; }
.magic-link input { margin-bottom: 8px; }
.magic-link button { width: 100%; }
#magic-status { color: var(--accent); font-size: 14px; }

.dev-login { margin-top: 20px; border-top: 1px dashed #333; padding-top: 12px; }
.dev-label { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.dev-login button { display: block; width: 100%; margin-bottom: 8px; text-align: left; font-size: 14px; }
/* In-page confirmation dialog (replaces window.confirm) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-box {
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
}
.confirm-box p { margin: 0 0 20px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; }
.confirm-actions button { width: auto; }

.live-caption {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 170px;
  overflow-y: auto;
}
.live-caption-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.live-caption-text { line-height: 1.55; color: var(--text); font-size: 15px; word-wrap: break-word; }
.live-caption-text .interim { color: var(--muted); }
.live-caption-text .placeholder { color: var(--muted); font-style: italic; }

.consent-note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; line-height: 1.5; }
.offline-banner { background: #4a2f00; color: #ffcf8f; border: 1px solid #6b4300; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.install-btn { margin-top: 14px; background: transparent; border: 1px solid var(--accent); color: var(--accent); font-size: 13px; padding: 8px 14px; border-radius: 8px; }
.install-btn:hover { background: var(--accent); color: #000; }
.recover-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.recover-row button { width: auto; }
.new-project-row { display: flex; gap: 8px; margin-top: 8px; }
.new-project-row input { flex: 1; margin: 0; }
.new-project-row button { width: auto; white-space: nowrap; }

/* Distribute-from-success-screen */
.distribute { margin-top: 20px; padding-top: 16px; border-top: 1px solid #2a2a2a; }
.distribute h3 { margin: 0 0 10px; }
.distribute .channel-opts { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.distribute .channel-opts label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; }
.distribute .channel-opts input { width: auto; margin: 0; }
.distrib-result { font-size: 13px; padding: 6px 0; border-top: 1px solid #2a2a2a; }
.distrib-result.sent { color: #81c784; }
.distrib-result.failed { color: var(--danger); }
.setup-link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.setup-link:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ── Pyxs portal card ────────────────────────────────────────────────────────
   A window into pyxs.ai's world (cool cyan→violet cosmos) set into recdr's
   warm analog UI. Gradient-border wrapper + deep-space inner panel; shared by
   the projects page Pyxs section and the recorder success-screen promo. */
.pyxs-card {
  position: relative;
  margin-top: 16px;
  border-radius: 15px;
  padding: 1px; /* the 1px gradient border */
  background: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  transition: box-shadow 0.35s ease;
}
.pyxs-card:hover { box-shadow: 0 4px 32px rgba(99, 102, 241, 0.25); }
.pyxs-card-inner {
  border-radius: 14px;
  padding: 18px 20px 20px;
  background:
    radial-gradient(130% 90% at 88% -10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(130% 100% at -5% 110%, rgba(168, 85, 247, 0.16), transparent 55%),
    linear-gradient(135deg, #0d1117 0%, #130828 100%);
}
.pyxs-brandline {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.pyxs-brandline img { width: 26px; height: 26px; display: block; }
.pyxs-wordmark {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 14px; font-weight: 600; letter-spacing: 0.06em; color: #e6edf3;
}
.pyxs-chip {
  margin-left: auto;
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  padding: 3px 9px; border-radius: 999px;
  color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  white-space: nowrap;
}
.pyxs-headline {
  margin: 0 0 6px; font-size: 16px; line-height: 1.35; font-weight: 700;
  background: linear-gradient(90deg, #7dd3fc, #22d3ee 30%, #a78bfa 75%, #c084fc);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pyxs-copy { margin: 0 0 14px; color: #9aa4b2; font-size: 13px; line-height: 1.55; }
.pyxs-copy .spark { color: #e6edf3; }
.pyxs-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pyxs-btn {
  appearance: none; cursor: pointer; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; padding: 9px 18px; width: auto;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.pyxs-btn-primary {
  border: none; color: #0d1117;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 2px 14px rgba(34, 211, 238, 0.25);
}
.pyxs-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 22px rgba(168, 85, 247, 0.4); }
.pyxs-btn-ghost {
  color: #e6edf3; background: transparent;
  border: 1px solid rgba(230, 237, 243, 0.22);
}
.pyxs-btn-ghost:hover { border-color: rgba(34, 211, 238, 0.5); color: #7dd3fc; }
.pyxs-link {
  color: #7dd3fc; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.pyxs-link:hover { color: #22d3ee; text-decoration: underline; }
.pyxs-status-ok { color: #7dd3fc; }
/* Provisioning checklist — glowing node per step, pyxs style */
.pyxs-steps { margin-top: 4px; }
.pyxs-step {
  display: flex; align-items: center; gap: 10px;
  color: #9aa4b2; font-size: 13px; padding: 4px 0;
}
.pyxs-step::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(154, 164, 178, 0.5); flex: none;
}
.pyxs-step.done { color: #e6edf3; }
.pyxs-step.done::before {
  border-color: transparent;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}
@keyframes pyxs-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.pyxs-step.busy::before {
  border-color: #22d3ee;
  animation: pyxs-pulse 1.4s ease-in-out infinite;
}
