:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --text: #e6e8ee;
  --muted: #8b93a7;
  --line: #262b36;
  --accent: #5b8cff;
  --ok: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --busy: #58a6ff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --panel-2: #f0f2f5;
    --text: #1a1d24;
    --muted: #626b7d;
    --line: #dfe3ea;
  }
}

* { box-sizing: border-box; }

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

main { flex: 1 0 auto; }

code, pre, .key {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.035em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25),
              0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.brand-mark svg { display: block; border-radius: 9px; }

.brand:hover .brand-mark {
  transform: translateY(-1px) rotate(-4deg);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 45%, transparent),
              0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* The wordmark: a solid "Sym" paired with a gradient "flip" that echoes the
   mark and quietly nods at the name. */
.brand-name { color: var(--text); }
.brand-flip {
  background: linear-gradient(120deg, var(--accent), #8b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.topbar nav { display: flex; align-items: center; gap: 14px; }
.topbar nav .muted { font-size: 13px; }

main { max-width: 1200px; margin: 0 auto; padding: 24px; width: 100%; }

/* The deployment page is log-heavy, so give it more room than form pages.
   Scoped with :has to the page that actually contains the log pane. */
main:has(#log) { max-width: 1440px; }

h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0 0 12px; text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--muted); }

.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.actions { display: flex; gap: 8px; }
.inline { display: inline; }
.right { text-align: right; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.card.narrow { max-width: 380px; margin: 48px auto; }
.card.empty { text-align: center; padding: 48px 20px; }

/* ── Auth (sign in / register) ─────────────────────────────────────────── */

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 24px 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: light) {
  .auth-card { box-shadow: 0 12px 40px rgba(20, 30, 60, 0.10); }
}

.auth-head { text-align: center; margin-bottom: 28px; }

.auth-mark {
  display: inline-flex;
  margin-bottom: 16px;
}
.auth-mark svg { display: block; border-radius: 10px; }

.auth-head h1 { font-size: 24px; margin: 0 0 6px; }
.auth-head p { margin: 0; font-size: 14px; }

/* Roomier fields than the dense in-app forms; this is the first impression. */
.auth-card label { margin-bottom: 18px; color: var(--text); font-size: 14px; }
.auth-card input { margin-top: 6px; padding: 11px 12px; font-size: 15px; }

.auth-alt { text-align: center; margin: 20px 0 0; font-size: 14px; }

/* The shared layout renders any error alert at the top of <main>, before the
   card. On auth pages, pull it into the card's column so it reads as part of
   the form rather than a full-width banner. */
main:has(.auth) .alert {
  max-width: 420px;
  margin: 24px auto -8px;
}

/* Full-width call-to-action button. */
button.block, .button.block { display: block; width: 100%; padding: 11px 14px; font-size: 15px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=search], input[type=tel], input:not([type]) {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
}

input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* Multi-line command fields. Monospace, because these are shell scripts: one
   step per line reads far better than a wall of && chaining, and the pipeline
   runs them under `set -e`, so each line stops the deploy if it fails. */
textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  min-height: 44px;
  tab-size: 2;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* ── Buttons ────────────────────────────────────────────────────────────────
   Exactly three intents, so a screen never looks like a paint chart:
     • .primary  — the one main action in a context (filled accent)
     • (default) — everything else (neutral outline)
     • .bad      — destructive only (red): delete, disable, remove
   Hover keeps each intent's own colour instead of turning everything blue. */

button, .button {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

button:hover, .button:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-2));
}
button:disabled, .button:disabled { opacity: 0.45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line); background: var(--panel-2); }

button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
  border-color: color-mix(in srgb, var(--accent) 88%, #000);
}

button.bad, .button.bad { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); color: var(--bad); background: transparent; }
button.bad:hover, .button.bad:hover {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--bad);
}

button.link {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  font-weight: 400;
  text-decoration: underline;
}
button.link:hover { background: none; color: var(--text); }
button.link.bad { color: var(--bad); }
button.link.bad:hover { color: var(--bad); }

.row form.inline, .row input { margin: 0; }
.row input { flex: 1; }

/* ── Lists & tables ────────────────────────────────────────────────────── */

.list { list-style: none; padding: 0; margin: 0; }

.list li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
}

.list li a:hover { border-color: var(--accent); }

/* Inside a project card the header row is compact, not a page header. */
.list li a .row.between { margin-bottom: 2px; align-items: center; }
.list li a .row { gap: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
     text-transform: uppercase; letter-spacing: 0.05em; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges & alerts ───────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.ok   { color: var(--ok);   border-color: var(--ok); }
.badge.bad  { color: var(--bad);  border-color: var(--bad); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.busy { color: var(--busy); border-color: var(--busy); }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert.bad  { border-color: var(--bad);  background: color-mix(in srgb, var(--bad) 8%, transparent); }
.alert.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }

/* ── Dashboard: fleet stats ────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card .stats { margin-bottom: 0; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card .stat { background: var(--panel-2); }

.stat-num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
}

.stat.bad { border-color: var(--bad); }
.stat.bad .stat-num { color: var(--bad); }

/* ── Dashboard: attention banner ───────────────────────────────────────── */

.attention-list { list-style: none; padding: 0; margin: 8px 0 0; }
.attention-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.attention-list a { font-weight: 500; }

/* ── Dashboard: layout + activity feed ─────────────────────────────────── */

.dashboard { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 720px) {
  .dashboard { grid-template-columns: 1fr 280px; align-items: start; }
}

.dashboard-main { min-width: 0; }
.dashboard-side .card { margin-bottom: 0; }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.activity li:last-child { border-bottom: none; }
.activity li .badge { align-self: flex-start; }
.activity-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-body a { font-weight: 500; text-decoration: none; }
.activity-body a:hover { text-decoration: underline; }
.activity-body .hint { margin-top: 0; }

/* ── Project vitals sparkline ──────────────────────────────────────────── */

.sparkline { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 3px; margin-top: 14px; }

.spark {
  width: 12px;
  height: 22px;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.spark.ok    { background: var(--ok);   border-color: var(--ok); }
.spark.bad   { background: var(--bad);  border-color: var(--bad); }
.spark.warn  { background: var(--warn); border-color: var(--warn); }
.spark.busy  { background: var(--busy); border-color: var(--busy); }

/* ── Onboarding checklist ──────────────────────────────────────────────── */

.checklist { list-style: none; counter-reset: none; padding: 0; margin: 0; }

.checklist li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: none; }

.checklist .step-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel-2);
}

.checklist .step-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.checklist .step-body strong { font-weight: 600; }
.checklist .step-body .hint { margin-top: 0; }
.checklist .step-body > form, .checklist .step-body > a.button { margin-top: 8px; }

/* Done: filled check. Current: accented. Todo: dimmed. */
.checklist li.done .step-num {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
  font-size: 0;
}
.checklist li.done .step-num::after { content: "✓"; font-size: 15px; }
.checklist li.current .step-num { border-color: var(--accent); color: var(--accent); }
.checklist li.todo { opacity: 0.55; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  margin-top: 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text);
}
.footer-brand svg { display: block; border-radius: 4px; }

.footer-links { margin-left: auto; display: flex; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ── Breadcrumbs ───────────────────────────────────────────────────────── */

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumb-sep { color: var(--line); }

/* ── Metadata definition list ──────────────────────────────────────────── */

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin: 0;
}
.meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.meta dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
}
.meta dd { margin: 0; font-size: 14px; }

/* ── Live pulse indicator ──────────────────────────────────────────────── */

.pulse {
  display: inline-block;
  width: 9px; height: 9px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--busy);
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 color-mix(in srgb, var(--busy) 60%, transparent); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 6px color-mix(in srgb, var(--busy) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.log-tools { display: flex; align-items: center; gap: 14px; }

/* ── Deployment view ───────────────────────────────────────────────────── */

.steps { list-style: none; padding: 0; margin: 0; }

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.steps li:last-child { border-bottom: none; }
.step-name { flex: 1; }

.log {
  background: #0b0d11;
  color: #c9d1d9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  /* A stable, large pane so streaming output doesn't reflow the page as it
     grows, and there's real room to read. Drag to resize taller if needed. */
  height: 62vh;
  min-height: 360px;
  resize: vertical;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.key {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details[open] summary { margin-bottom: 14px; }

a { color: var(--accent); }

/* ── Configuration panels ──────────────────────────────────────────────────
   The project page's configure-once surfaces. Each is a self-contained panel
   with an icon, a plain-language title, a one-line description and a status
   pill, so an operator can see at a glance what's set up and what still needs
   attention — instead of a stack of look-alike disclosure triangles. */

.config-list { display: flex; flex-direction: column; gap: 12px; }

.config {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
}

.config > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  list-style: none;
  margin: 0;
}
.config > summary::-webkit-details-marker { display: none; }
.config > summary::marker { content: ""; }
.config > summary:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.config[open] > summary { border-bottom: 1px solid var(--line); }

.config-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.config-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.config-head strong { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }
.config-head span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.config-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.config-chevron { color: var(--muted); transition: transform 0.2s ease; }
.config[open] .config-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .config-chevron { transition: none; } }

.config-body { padding: 18px 16px 20px; }
.config-body > :first-child { margin-top: 0; }
.config-body > :last-child { margin-bottom: 0; }

/* A lighter, nested disclosure inside a panel (e.g. "Replace server"). */
.config-body .subtle { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.config-body .subtle > summary { color: var(--muted); font-size: 13px; padding-top: 12px; }

/* Copy-to-clipboard affordance layered over a <pre class="key">. */
.key-field { position: relative; }
.key-field .key { margin: 0; padding-right: 74px; }
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 12px;
  font-size: 12px;
  background: var(--panel);
}

/* ── Grouped form layout ───────────────────────────────────────────────────
   Two-column responsive grid so settings read as a form to fill, not a tall
   ladder of identical fields. */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid .field input,
.form-grid .field textarea { margin: 0; }

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.field-group { margin-bottom: 24px; }
.field-group:last-of-type { margin-bottom: 0; }
.group-title {
  display: block;
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: none;
}

.form-grid .field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.form-grid .field.checkbox input { width: auto; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Delete lives behind a visual firebreak, not beside a Save button. */
.danger-zone {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.danger-zone .dz-copy { display: flex; flex-direction: column; gap: 3px; }
.danger-zone strong { color: var(--text); font-weight: 600; }
.danger-zone .hint { margin: 0; }
.danger-zone form { margin: 0; }

/* ── Project page: header ──────────────────────────────────────────────── */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.page-head h1 { margin: 0 0 8px; }
.page-head .actions { flex: none; }

.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.project-meta .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.project-meta .ic { color: color-mix(in srgb, var(--muted) 85%, transparent); }

/* ── Project page: overview card (live status + vitals in one) ──────────── */

.overview-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.overview-status .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.overview-status .where { display: flex; align-items: center; gap: 10px; }

.overview .stats { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); margin-bottom: 0; }
.overview .sparkline { margin-top: 14px; }

/* ── Project page: deployment history (bounded so config stays reachable) ─ */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; }
.section-head .hint { margin: 0; }

.table-scroll { max-height: 360px; overflow: auto; margin-top: 12px; border-radius: 8px; }
.table-scroll table { margin: 0; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line);
}
.table-scroll thead th { border-bottom: none; }

/* Single-field forms (notifications, etc.): a labelled input over a helper
   line over its actions — spaced deliberately, not crammed. */
.stack-field { display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin: 0; }

/* ── Landing page ──────────────────────────────────────────────────────────
   The public marketing page renders full-bleed sections rather than the app's
   constrained <main>, so it defines its own document shell (see landing.html).
   It reuses the same tokens as the app so light/dark stay in lock-step. */

/* Stroke-based (Lucide/Feather-style) icons drawn with currentColor. */
.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

body.lp { display: block; }

.lp-topbar { padding: 12px clamp(20px, 5vw, 56px); }
.lp-nav { display: flex; align-items: center; gap: 20px; }
.lp-nav > a:not(.button) { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-nav > a:not(.button):hover { color: var(--text); }

@media (max-width: 720px) {
  .lp-nav > a:not(.button):not([href^="http"]) { display: none; }
  .lp-nav > a[href^="http"] { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.lp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 5vw, 56px) 56px;
  background:
    radial-gradient(1100px 520px at 78% -8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(760px 420px at 6% 4%, color-mix(in srgb, var(--busy) 12%, transparent), transparent 55%);
}

.lp-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: color-mix(in srgb, var(--text) 82%, var(--accent));
  font-size: 13px;
  font-weight: 550;
}
.lp-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.lp-title {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 720;
  margin: 20px 0 0;
}

.lp-lede {
  margin: 20px 0 0;
  max-width: 30em;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}
.lp-lede strong { color: var(--text); font-weight: 620; }

.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lp-cta-row.center { justify-content: center; }

.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 560;
}
.lp-cta.primary {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 38%, transparent);
}
.lp-cta.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 48%, transparent);
}
.lp-cta { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }

.lp-microcopy { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* Product glimpse window. */
.lp-hero-visual { min-width: 0; }

.lp-window {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
@media (prefers-color-scheme: light) {
  .lp-window { box-shadow: 0 30px 70px rgba(20, 30, 60, 0.16); }
}

.lp-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.lp-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.lp-dot:nth-child(1) { background: #f85149; opacity: 0.7; }
.lp-dot:nth-child(2) { background: #d29922; opacity: 0.7; }
.lp-dot:nth-child(3) { background: #3fb950; opacity: 0.7; }
.lp-window-title { margin-left: 6px; font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lp-live { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--busy); }
.lp-live .pulse { margin: 0; }

.lp-window-body { padding: 16px 18px 18px; }

.lp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text);
}
.lp-step code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.lp-step .lp-t { margin-left: auto; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.lp-check {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: grid; place-items: center; font-size: 11px;
}
.lp-spin {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--busy) 30%, transparent);
  border-top-color: var(--busy);
  animation: lp-spin 0.8s linear infinite;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lp-spin { animation: none; } }
.lp-step.run { color: var(--busy); }

.lp-log {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #0b0d11;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}
.lp-log-line { color: #c9d1d9; }
.lp-log-line.ok { color: #56d364; }
.lp-log-line.dim { color: #768390; }

/* Trust strip under the hero. */
.lp-trust {
  list-style: none;
  margin: clamp(40px, 6vw, 64px) auto 0;
  padding: 0;
  max-width: 1160px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.lp-trust li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 20px 12px;
}
.lp-trust strong { display: block; font-size: 28px; font-weight: 680; letter-spacing: -0.02em; color: var(--text); }
.lp-trust span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .lp-trust { grid-template-columns: repeat(2, 1fr); } }

/* ── Content sections ──────────────────────────────────────────────────── */

.lp-section { padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 56px); max-width: 1160px; margin: 0 auto; }

.lp-section-head { text-align: center; max-width: 40em; margin: 0 auto clamp(36px, 5vw, 56px); }
.lp-h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 680;
  margin: 0;
  text-transform: none;
  color: var(--text);
}
.lp-sub { margin: 14px 0 0; font-size: 17px; color: var(--muted); line-height: 1.6; }

.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .lp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-grid { grid-template-columns: 1fr; } }

.lp-feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 24px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.lp-feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}
@media (prefers-color-scheme: light) {
  .lp-feature:hover { box-shadow: 0 14px 34px rgba(20, 30, 60, 0.10); }
}
.lp-ic-badge {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.lp-feature h3 { margin: 16px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.lp-feature code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  color: var(--text);
}

/* How it works. */
.lp-how { border-top: 1px solid var(--line); }
.lp-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: none;
}
@media (max-width: 760px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-steps li { display: flex; gap: 16px; }
.lp-step-n {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 680;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.lp-steps h3 { margin: 6px 0 6px; font-size: 17px; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ── Final CTA ─────────────────────────────────────────────────────────── */

.lp-final {
  padding: clamp(56px, 8vw, 100px) clamp(20px, 5vw, 56px);
}
.lp-final-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 20px;
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
  background:
    radial-gradient(600px 300px at 50% -20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    var(--panel);
}
.lp-final h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
  text-transform: none;
  color: var(--text);
}
.lp-final p { margin: 16px auto 0; max-width: 36em; font-size: 17px; color: var(--muted); line-height: 1.6; }
.lp-final .lp-cta-row { margin-top: 28px; }
