/* sshbuddy website – one stylesheet for all pages, no build step. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f5f1;
  --bg-raised: #ffffff;
  --bg-sunken: #ecebe5;
  --text: #16181d;
  --text-muted: #5b606b;
  --border: #dcdad2;
  --accent: #0f9d58;
  --accent-strong: #0b7a44;
  --accent-soft: #dff3e8;
  --warn: #b26a00;
  --deny: #c8372d;
  --link: #0b7a44;

  /* The terminal and phone stay dark in both themes. */
  --term-bg: #0d1014;
  --term-text: #d7dde5;
  --term-dim: #6c7684;
  --term-green: #4ade80;
  --term-amber: #fbbf24;
  --term-red: #f87171;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --bg-raised: #13161b;
    --bg-sunken: #0f1216;
    --text: #e8ebf0;
    --text-muted: #9aa2ae;
    --border: #232832;
    --accent: #4ade80;
    --accent-strong: #86efac;
    --accent-soft: #11291b;
    --warn: #fbbf24;
    --deny: #f87171;
    --link: #86efac;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-raised: #13161b;
  --bg-sunken: #0f1216;
  --text: #e8ebf0;
  --text-muted: #9aa2ae;
  --border: #232832;
  --accent: #4ade80;
  --accent-strong: #86efac;
  --accent-soft: #11291b;
  --warn: #fbbf24;
  --deny: #f87171;
  --link: #86efac;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; font-size: 18px; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--bg); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font-weight: 560; font-size: 16px; text-decoration: none;
  border: 1px solid var(--border); background: var(--bg-raised); color: var(--text);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }

/* ---------- hero ---------- */

.hero { padding: 72px 0 56px; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px; align-items: center;
}
@media (max-width: 920px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 8px;
  background: var(--bg-raised);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 680; margin: 20px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--text-muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--text-muted); }

.copy-line {
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px; max-width: 100%;
  font-family: var(--mono); font-size: 14px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 8px 8px 14px;
}
.copy-line code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  background: none; border: 0; padding: 0;
}
.copy-line .prompt { color: var(--text-muted); user-select: none; }

/* ---------- demo (terminal + phone) ---------- */

.demo { display: flex; align-items: flex-start; }
.demo-left { flex: 1 1 auto; min-width: 0; margin-right: -28px; }
.term {
  background: var(--term-bg); color: var(--term-text);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid #1d232c;
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  min-height: 300px; overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #1a2028; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a313b; }
.term-bar span { margin-left: 8px; color: var(--term-dim); font-size: 12px; }
.term-body { padding: 14px 16px 18px; white-space: pre-wrap; word-break: break-word; }
.term-body .p { color: var(--term-green); }
.term-body .dim { color: var(--term-dim); }
.term-body .ok { color: var(--term-green); }
.term-body .warn { color: var(--term-amber); }
.term-body .err { color: var(--term-red); }
.caret {
  display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px;
  background: var(--term-text); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.phone {
  position: relative; z-index: 1; flex: 0 0 228px; margin-top: 64px;
  background: #0a0c0f; border-radius: 34px; padding: 10px;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.35), 0 0 0 1px #262c35;
}
.phone-screen {
  border-radius: 26px; min-height: 300px; padding: 40px 10px 16px;
  background: radial-gradient(120% 80% at 30% 0%, #23402f 0%, #11161c 55%, #0b0e12 100%);
  position: relative; overflow: hidden;
}
.phone-screen::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 22px; border-radius: 12px; background: #000;
}
.phone-time { text-align: center; color: #e9eef3; font-size: 44px; font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.phone-date { text-align: center; color: #aab4bf; font-size: 12px; margin: 6px 0 18px; }

.notif {
  background: rgb(36 41 48 / 0.92); color: #eef2f6;
  border-radius: 16px; padding: 11px 12px 12px; font-size: 12.5px; line-height: 1.4;
  transform: translateY(-14px) scale(0.96); opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.9,.3,1.2), opacity 0.3s ease;
}
.notif.show { transform: none; opacity: 1; }
.notif-head { display: flex; align-items: center; gap: 6px; color: #aab4bf; font-size: 11px; margin-bottom: 4px; }
.notif-head b { color: #dfe5eb; font-weight: 600; }
.notif-head .app { width: 16px; height: 16px; border-radius: 4px; background: #3a7d5c; display: grid; place-items: center; font-size: 10px; }
.notif-title { font-weight: 650; }
.notif-body { color: #c4ccd5; }
.notif-actions { display: grid; gap: 6px; margin-top: 10px; }
.notif-actions span {
  display: block; text-align: center; padding: 7px; border-radius: 9px;
  background: rgb(255 255 255 / 0.09); color: #eef2f6; font-weight: 560;
  transition: background 0.2s ease, transform 0.15s ease;
}
.notif-actions span.tap { transform: scale(0.95); background: rgb(74 222 128 / 0.35); }
.notif-actions span.tap.deny { background: rgb(248 113 113 / 0.35); }

.demo-caption {
  margin-top: 14px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.demo-caption .dot { background: var(--warn); }
.demo-caption.ok .dot { background: var(--accent); }
.demo-caption.no .dot { background: var(--deny); }

@media (max-width: 560px) {
  .demo { flex-direction: column; align-items: stretch; }
  .demo-left { margin-right: 0; }
  .term { min-height: 230px; font-size: 12.5px; }
  .phone { flex: none; width: 228px; margin: 20px auto 0; }
}

/* ---------- sections ---------- */

section { padding: 88px 0; }
@media (max-width: 600px) { section { padding: 56px 0; } }
.section-alt { background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.08em; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 660; margin: 10px 0 14px; }
.section-head p { color: var(--text-muted); font-size: 18px; }

/* flow */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 860px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .flow { grid-template-columns: minmax(0, 1fr); } }
.flow li {
  list-style: none; position: relative;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.section-alt .flow li { background: var(--bg); }
.flow li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong);
  font-family: var(--mono); font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.flow h3 { font-size: 17px; font-weight: 620; margin-bottom: 6px; }
.flow p { color: var(--text-muted); font-size: 15px; }
.flow { padding: 0; margin: 0; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { background: var(--bg-raised); padding: 26px 24px; }
.section-alt .feature { background: var(--bg); }
.feature svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 17px; font-weight: 620; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 15px; }

/* agents split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.split .full { grid-column: 1 / -1; }
.split .checklist { margin-top: 6px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--text-muted); }
.checklist li b { color: var(--text); font-weight: 600; }
.checklist svg { width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }

.log {
  background: var(--term-bg); color: var(--term-text); border-radius: var(--radius);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; padding: 18px 18px;
  overflow-x: auto; white-space: pre; box-shadow: var(--shadow); border: 1px solid #1d232c;
}
.log .dim { color: var(--term-dim); }
.log .ok { color: var(--term-green); }
.log .err { color: var(--term-red); }
.log .warn { color: var(--term-amber); }
.log-label { font-family: var(--mono); font-size: 12px; color: var(--text-muted); margin: 0 0 8px; }

/* comparison */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); }
.section-alt .table-wrap { background: var(--bg); }
table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 15px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-weight: 600; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.us, th.us { background: var(--accent-soft); }
.yes { color: var(--accent-strong); font-weight: 600; }
.no { color: var(--text-muted); }
.footnote { color: var(--text-muted); font-size: 14px; margin-top: 14px; }

/* honest box */
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .limits { grid-template-columns: minmax(0, 1fr); } }
.limit { border: 1px dashed var(--border); border-radius: var(--radius); padding: 20px; }
.limit h3 { font-size: 16px; font-weight: 620; margin-bottom: 6px; }
.limit p { color: var(--text-muted); font-size: 15px; }

/* final cta */
.final { text-align: center; }
.final h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 680; margin-bottom: 14px; }
.final p { color: var(--text-muted); font-size: 18px; max-width: 34em; margin: 0 auto; }
.final .cta { justify-content: center; }

/* ---------- docs / install page ---------- */

.doc { padding: 56px 0 96px; }
.doc .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
@media (max-width: 860px) { .doc .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc { display: none; } }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc p { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.doc-body { max-width: 760px; }
.legal .wrap { display: block; }
.legal .doc-body h2 { font-size: 19px; margin: 34px 0 8px; }
.doc-body h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 680; margin-bottom: 14px; }
.doc-body > p.lede { margin-bottom: 36px; }
.doc-body h2 { font-size: 24px; font-weight: 640; margin: 52px 0 14px; scroll-margin-top: 84px; display: flex; gap: 12px; align-items: baseline; }
.doc-body h2 .n { font-family: var(--mono); font-size: 14px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }
.doc-body h3 { font-size: 18px; font-weight: 620; margin: 28px 0 10px; }
.doc-body p, .doc-body li { color: var(--text-muted); }
.doc-body p + p { margin-top: 12px; }
.doc-body ul, .doc-body ol { padding-left: 1.2em; }
.doc-body li { margin: 4px 0; }
.doc-body strong { color: var(--text); }

.code {
  position: relative; margin: 14px 0 18px;
  background: var(--term-bg); color: var(--term-text);
  border-radius: 12px; border: 1px solid #1d232c;
}
.code pre { margin: 0; padding: 16px 80px 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.code .where + .copy + pre { padding-right: 18px; }
.code .where {
  display: block; font-family: var(--mono); font-size: 11.5px; color: var(--term-dim);
  padding: 9px 18px 0; text-transform: uppercase; letter-spacing: 0.06em;
}
.code .c { color: var(--term-dim); }
.code .p { color: var(--term-green); user-select: none; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 500 12px var(--font); color: var(--term-text);
  background: #1a2028; border: 1px solid #2a313b; border-radius: 7px;
  padding: 4px 10px; cursor: pointer;
}
.copy:hover { background: #232a34; }
.copy-line .copy { position: static; background: var(--bg-sunken); color: var(--text); border-color: var(--border); }

.callout {
  border: 1px solid var(--border); border-left: 4px solid var(--warn);
  background: var(--bg-raised); border-radius: 10px; padding: 14px 18px; margin: 18px 0;
}
.callout.info { border-left-color: var(--accent); }
.callout p { color: var(--text); font-size: 15.5px; }
.callout p + p { margin-top: 8px; }

.tabs { display: flex; gap: 6px; margin: 18px 0 0; flex-wrap: wrap; }
.tabs button {
  font: 500 14px var(--font); color: var(--text-muted);
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--text); background: var(--bg-raised); border-color: var(--text-muted); }
.tabpanel[hidden] { display: none; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--text-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.site-footer nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
