/* myfirstmate management plane - hand-rolled design system (no Tailwind/build). */

:root {
  --ink: #0b1220;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e6e9ef;
  --line-strong: #d4dae6;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-soft: #eef2ff;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav + footer ---------- */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.navbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.navbar-link {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.navbar-link:hover {
  color: var(--ink);
  text-decoration: none;
}
.navbar-email {
  color: var(--muted);
  font-size: 0.85rem;
}

.main {
  flex: 1 0 auto;
  padding: 40px 0 64px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-muted {
  color: var(--line-strong);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn-sm {
  padding: 8px 13px;
  font-size: 0.875rem;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-ink);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: #f3c2c2;
}
.btn-danger:hover {
  background: var(--danger-soft);
}
.btn-block {
  width: 100%;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 16px;
}
.field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-input-error {
  border-color: var(--danger);
}
.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-size: 0.83rem;
  margin: 6px 0 0;
}
.field-error-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: 22px 24px;
}
.card + .card {
  margin-top: 20px;
}
.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
}
.card-title .icon {
  width: 19px;
  height: 19px;
  color: var(--muted);
}
.card-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 18px;
}

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.page-title {
  font-size: 1.7rem;
  font-weight: 800;
}
.page-subtitle {
  color: var(--muted);
  margin: 6px 0 0;
}

/* ---------- Auth ---------- */
.auth {
  max-width: 420px;
  margin: 18px auto;
}
.auth .card-pad {
  padding: 28px 28px 26px;
}
.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}
.auth-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.92rem;
}
.auth-alt {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 18px;
}

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge .icon {
  width: 14px;
  height: 14px;
}
.badge-ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #c9ecd3;
}
.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: #f4e2bc;
}
.badge-muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}
.dot-live {
  box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(21, 128, 61, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0);
  }
}

/* ---------- Definition rows / connector config ---------- */
.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
  align-items: center;
}
.kv-key {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.kv-val {
  font-size: 0.92rem;
}
.code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 8px;
  color: var(--ink);
  word-break: break-all;
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-row .code {
  flex: 1 1 auto;
  min-width: 0;
}
.copy-btn {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
}
.copy-btn:hover {
  background: var(--surface-2);
}
.copy-btn.is-copied {
  color: var(--ok);
  border-color: #c9ecd3;
}
.snippet {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  background: #0d1424;
  color: #d7def0;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre;
}
.snippet .tok-var {
  color: #7dd3fc;
}

/* ---------- Activity feed ---------- */
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.feed-item:first-child {
  border-top: none;
}
.feed-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.feed-icon .icon {
  width: 17px;
  height: 17px;
}
.feed-icon.is-reply {
  background: var(--ok-soft);
  color: var(--ok);
}
.feed-icon.is-offline {
  background: var(--warn-soft);
  color: var(--warn);
}
.feed-body {
  min-width: 0;
}
.feed-title {
  font-size: 0.9rem;
  font-weight: 600;
}
.feed-text {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.feed-time {
  color: var(--line-strong);
  font-size: 0.78rem;
  white-space: nowrap;
}
.empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 22px 0;
}

/* ---------- Flash ---------- */
.flash-group {
  position: fixed;
  top: 76px;
  right: 20px;
  width: min(360px, calc(100vw - 40px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flash {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--line);
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.flash-icon {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
}
.flash-info {
  border-color: #c9ecd3;
}
.flash-info .flash-icon {
  color: var(--ok);
}
.flash-error {
  border-color: #f3c2c2;
}
.flash-error .flash-icon {
  color: var(--danger);
}
.flash-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 1px;
}
.flash-message {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Landing ---------- */
.hero {
  text-align: center;
  padding: 30px 0 8px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #dfe3fb;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-eyebrow .icon {
  width: 15px;
  height: 15px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 20px auto 0;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.tweet-demo {
  max-width: 520px;
  margin: 44px auto 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.tweet-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tweet-row + .tweet-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.tweet-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}
.tweet-avatar.you {
  background: linear-gradient(135deg, #64748b, #334155);
}
.tweet-avatar.bot {
  background: linear-gradient(135deg, #6366f1, #4338ca);
}
.tweet-name {
  font-weight: 700;
  font-size: 0.92rem;
}
.tweet-handle {
  color: var(--muted);
  font-weight: 400;
}
.tweet-text {
  margin: 2px 0 0;
  font-size: 0.95rem;
}
.tweet-text .mention {
  color: var(--accent-ink);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 60px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  margin-bottom: 13px;
}
.step h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.step p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 70px 0 6px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 8px;
  max-width: 520px;
}

.trust {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.trust-item .icon {
  width: 20px;
  height: 20px;
  color: var(--ok);
  flex: none;
  margin-top: 2px;
}
.trust-item strong {
  display: block;
  font-size: 0.94rem;
}
.trust-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.cta-band {
  margin: 72px 0 8px;
  text-align: center;
  background: linear-gradient(135deg, #0d1424, #1e1b4b);
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 24px;
}
.cta-band h2 {
  font-size: 1.6rem;
  font-weight: 800;
}
.cta-band p {
  color: #c7d0e6;
  margin: 10px auto 24px;
  max-width: 460px;
}

/* ---------- Layout helpers ---------- */
.stack-sm > * + * {
  margin-top: 10px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.inline-form {
  display: inline;
}

@media (max-width: 720px) {
  .steps,
  .trust {
    grid-template-columns: 1fr;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .kv-key {
    margin-top: 8px;
  }
}
