:root {
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --ink: #25231e;
  --muted: #6e6a5f;
  --faint: #9a958a;
  --line: #e3ddcf;
  --line-strong: #cfc8b7;
  --accent: #1c6b4d;
  --accent-soft: #e4efe8;
  --accent-ink: #134e38;
  --danger: #a3352a;
  --danger-soft: #f6e7e3;
  --amber: #9a6a12;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

code, .mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86em;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.brand:hover { text-decoration: none; }
.topbar .who { color: var(--muted); font-size: 0.9rem; display: flex; gap: 16px; align-items: center; }

main { padding: 40px 0 80px; }

/* Animated entrance */
.stagger > * { opacity: 0; transform: translateY(6px); animation: rise 0.5s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.10s; }
.stagger > *:nth-child(4) { animation-delay: 0.14s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .stagger > * { opacity: 1; transform: none; animation: none; }
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.page-head h1 { font-size: 2rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  color: var(--faint); font-weight: 600; margin-bottom: 6px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card .card-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card .card-head h2 { font-size: 1.15rem; }
.card .card-body { padding: 22px; }

/* Project list */
.project-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: #faf8f1; }
.project-row .meta { color: var(--muted); font-size: 0.88rem; }
.project-row .name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.1rem; }
.project-row .host { color: var(--accent-ink); }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.74rem;
  font-weight: 600; letter-spacing: 0.02em;
}
.pill.live { background: var(--accent-soft); color: var(--accent-ink); }
.pill.live .ico { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill.muted { background: #efece3; color: var(--muted); }

/* Deployment + domain rows */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list .primary-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.list .sub { color: var(--faint); font-size: 0.82rem; }

/* Forms */
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="file"] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #fff; font: inherit; color: var(--ink);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { margin-bottom: 16px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 200px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.small { padding: 6px 11px; font-size: 0.84rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }

/* Notices */
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.92rem; }
.notice.ok { background: var(--accent-soft); color: var(--accent-ink); }
.notice.bad { background: var(--danger-soft); color: var(--danger); }

.empty { color: var(--muted); text-align: center; padding: 36px 0; }
.spacer { height: 26px; }
.hint { color: var(--faint); font-size: 0.82rem; margin-top: 6px; }
.row-actions { display: flex; gap: 4px; align-items: center; }

/* Login */
.login-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 380px; }
