:root {
  color-scheme: dark;
  --bg: #0a0d10;
  --panel: #10151a;
  --panel-2: #0d1216;
  --line: #232a30;
  --ink: #dbe3e8;
  --muted: #8a97a0;
  --accent: #35c987;   /* synced / clean */
  --accent-2: #e8a33d; /* dirty / pending */
  --accent-3: #5fb3ff; /* info / links */
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  background-image:
    radial-gradient(60ch 40ch at 85% -10%, rgba(53, 201, 135, 0.08), transparent 60%),
    radial-gradient(50ch 35ch at 0% 10%, rgba(95, 179, 255, 0.06), transparent 60%);
  background-attachment: fixed;
}

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem; }

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

code { font-family: var(--mono); font-size: 0.92em; background: rgba(255, 255, 255, 0.06); padding: 0.1em 0.4em; border-radius: 4px; }

/* -- header / nav (namespaced to avoid clashing with the injected site nav) -- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(10, 13, 16, 0.75);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 28px; height: 28px; border-radius: 7px; }

.nav-links { display: flex; align-items: center; gap: 1.3rem; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); text-decoration: none; }

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
}
.btn:hover { border-color: var(--accent-3); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06231a; font-weight: 600; }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.08); }

/* -- hero -- */

.hero-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem 1.5rem 3rem;
}
@media (max-width: 900px) { .hero-shell { grid-template-columns: 1fr; padding-top: 2.5rem; } }

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(53, 201, 135, 0.1);
  border: 1px solid rgba(53, 201, 135, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.2; margin: 0 0 1rem; }
h1 .name { font-family: var(--mono); color: var(--accent); }

.lede { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.lede code { color: var(--ink); }

.actions { display: flex; gap: 0.8rem; margin: 1.4rem 0 1rem; flex-wrap: wrap; }

.hero-note { color: var(--muted); font-size: 0.85rem; max-width: 46ch; }

/* -- terminal mockup -- */

.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.terminal-controls { display: flex; gap: 0.4rem; }
.term-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-title { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

.terminal-body {
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-x: auto;
}
.ln-dirty { color: var(--accent-2); }
.ln-ok { color: var(--accent); }
.ln-sum { color: var(--ink); font-weight: 700; }
.ln-watch { color: var(--accent-3); }

/* -- the man page itself -- */

#manpage-wrap { padding: 1.5rem 1.5rem 4rem; }

.manpage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0 2.2rem 1rem;
  font-family: var(--mono);
  font-size: 0.92rem;
}
@media (max-width: 700px) { .manpage { padding: 0 1.2rem 1rem; } }

.mp-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.mp-bar:last-of-type { border-bottom: none; border-top: 1px solid var(--line); margin-top: 1rem; }
.mp-bar span:nth-child(2) { flex: 1; text-align: center; }

.mp-sh {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 0.8rem;
}

.mp-body { margin: 0 0 1rem 2ch; color: var(--ink); max-width: 78ch; }
.mp-body b { color: var(--ink); }

.mp-syn, .mp-pre {
  margin: 0 0 1rem 2ch;
  padding: 0.9rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  font-size: 0.86rem;
}
.mp-pre .prompt { color: var(--accent); }
.mp-pre .comment { color: var(--muted); }

.mp-opts { margin: 0 0 1rem 2ch; }
.mp-opts dt { font-weight: 700; color: var(--accent-3); margin-top: 0.7rem; }
.mp-opts dd { margin: 0.15rem 0 0 3ch; color: var(--muted); max-width: 74ch; }

/* -- footer -- */

.site-foot { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: 0.85rem; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }
