/* ProcessGuard site: one stylesheet for the landing page and the docs. */

:root {
  /* Light macOS surfaces and the severity colours of the app (AppTheme.swift). */
  --bg: #f5f5f7;
  --bg-2: #ebedf0;
  --panel: #ffffff;
  --panel-2: #f2f4f6;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-2: #33393f;
  --muted: #545b63;
  --dim: #7a828a;
  --teal: #12968b;
  --brand: #1fb5a8;
  --navy: #0b4a7a;
  --link: #0b6f8f;
  --cyan: #0099b3;
  --blue: #3366cc;
  --green: #33a64d;
  --amber: #d98019;
  --red: #d93333;
  --violet: #804db3;
  --grad: linear-gradient(135deg, #1fb5a8 0%, #0b4a7a 100%);
  --term-bg: #0d1117;
  --term-bar: #1a2029;
  --term-text: #c9d4de;
  --radius: 12px;
  --shadow: 0 24px 60px -24px rgba(11, 40, 64, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.08em 0.38em;
  border-radius: 6px;
  color: var(--navy);
}
kbd {
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(245, 245, 247, 0.8);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--dim); font-size: 12px; margin-left: 2px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 14.5px; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(11, 74, 122, 0.6); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: var(--panel); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 40px; overflow: hidden; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 900px; z-index: -1;
  background:
    radial-gradient(600px 380px at 30% 30%, rgba(31, 181, 168, 0.18), transparent 70%),
    radial-gradient(520px 360px at 72% 22%, rgba(11, 74, 122, 0.12), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel);
  color: var(--muted); font-size: 13.5px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(51, 166, 77, 0.18); }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -0.035em;
  margin: 22px auto 18px; max-width: 980px; font-weight: 800;
}
.hero .lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 720px; margin: 0 auto 32px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .meta { margin-top: 18px; color: var(--dim); font-size: 13.5px; }

/* macOS window frame around screenshots */
.window {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
}
.window img { width: 100%; height: auto; }
.hero-shot { margin: 64px auto 0; max-width: 1080px; position: relative; }
.hero-shot::before {
  content: ""; position: absolute; inset: 8% 6% -6%; z-index: -1;
  background: var(--grad); filter: blur(90px); opacity: 0.18; border-radius: 40px;
}
.callout {
  position: absolute; z-index: 2;
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--line-2); border-left: 3px solid var(--amber);
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; text-align: left;
  box-shadow: 0 18px 40px -16px rgba(11, 40, 64, 0.45); backdrop-filter: blur(8px);
  max-width: 250px;
}
.callout b { display: block; color: var(--text); font-size: 14px; }
.callout span { color: var(--muted); }
.callout.c1 { left: -40px; top: 16%; }
.callout.c2 { right: -44px; top: 40%; border-left-color: var(--cyan); }
.callout.c3 { left: 8%; bottom: -26px; border-left-color: var(--green); }

/* ---------- Sections ---------- */
section { padding: 110px 0; position: relative; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line); }
.eyebrow { color: var(--teal); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.025em; margin: 12px 0 16px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

/* Logo strip / facts */
/* Facts as the stat tiles of the app: white card, coloured bar on the left. */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 72px; text-align: left; }
.fact { background: var(--panel); padding: 18px 20px; border-radius: 10px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--teal); }
.fact:nth-child(2) { border-left-color: var(--blue); }
.fact:nth-child(3) { border-left-color: var(--green); }
.fact:nth-child(4) { border-left-color: var(--violet); }
.fact small { display: block; color: var(--dim); font-size: 12.5px; }
.fact strong { display: block; font-size: 28px; letter-spacing: -0.02em; color: var(--text); }
.fact span { color: var(--muted); font-size: 14px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--panel); box-shadow: var(--shadow-sm);
  border-radius: var(--radius); padding: 22px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature:hover { box-shadow: 0 0 0 1px rgba(18, 150, 139, 0.45), 0 10px 24px -14px rgba(11, 40, 64, 0.35); transform: translateY(-2px); }
.feature .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-size: 20px; margin-bottom: 16px;
  background: rgba(31, 181, 168, 0.12); border: 1px solid rgba(31, 181, 168, 0.3); color: var(--teal);
}
.feature h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Split rows: text + image */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: 1.25fr 1fr; }
.split.reverse .split-text { order: 2; }
.split + .split { margin-top: 120px; }
.split-text h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 14px; }
.split-text p { color: var(--muted); font-size: 17px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li { position: relative; padding-left: 30px; margin: 10px 0; color: var(--text); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--teal);
}

/* Showcase tabs */
.tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted);
  padding: 9px 18px; border-radius: 999px; font-size: 14.5px; cursor: pointer; font-family: inherit;
}
.tab[aria-selected="true"] { color: #fff; background: var(--navy); border-color: var(--navy); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade 0.35s ease; }
.tab-caption { text-align: center; color: var(--muted); margin: 22px auto 0; max-width: 720px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Terminal */
.terminal {
  background: var(--term-bg); border: 1px solid #000; border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; font-family: var(--mono); font-size: 13px;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--term-bar); border-bottom: 1px solid #000; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 10px; color: #8b96a1; font-size: 12px; }
.terminal pre { margin: 0; padding: 18px 20px; overflow-x: auto; line-height: 1.55; color: var(--term-text); white-space: pre; }
.t-prompt { color: #3fd0c3; }
.t-dim { color: #7d8893; }
.t-warn { color: #f0a43a; }
.t-ok { color: #4cc76a; }
.t-crit { color: #ef5b5b; }

/* Privacy band */
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.privacy-item { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); }
.privacy-item .ico { font-size: 22px; flex: none; }
.privacy-item h3 { margin: 0 0 6px; font-size: 16.5px; }
.privacy-item p { margin: 0; color: var(--muted); font-size: 15px; }

/* Architecture diagram */
.arch { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; }
.arch-box { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px; background: var(--panel); }
.arch-box h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.arch-box ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.arch-box .tag { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.arch-link { text-align: center; color: var(--dim); font-family: var(--mono); font-size: 12.5px; }
.arch-link .line { width: 90px; height: 2px; background: var(--grad); margin: 8px auto; border-radius: 2px; }
.arch-clients { display: grid; gap: 12px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--panel); position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--grad); margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 22px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Final CTA */
.cta-band {
  text-align: center; border-radius: 24px; padding: 72px 32px;
  background:
    radial-gradient(500px 240px at 20% 0%, rgba(31, 181, 168, 0.35), transparent 70%),
    radial-gradient(500px 240px at 80% 100%, rgba(31, 181, 168, 0.2), transparent 70%),
    var(--navy);
  color: #fff;
}
.cta-band h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.025em; margin: 0 0 14px; }
.cta-band p { color: rgba(255, 255, 255, 0.78); font-size: 18px; margin: 0 auto 28px; max-width: 620px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--dim); font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* Lightbox */
.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(20, 24, 30, 0.85); backdrop-filter: blur(6px); cursor: zoom-out; padding: 32px;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: min(1400px, 100%); max-height: 100%; border-radius: 12px; box-shadow: var(--shadow); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ================= Docs ================= */
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; align-items: start; padding: 40px 0 96px; }
.docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14.5px; padding-right: 8px; }
.docs-nav h5 { margin: 22px 0 8px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.docs-nav h5:first-child { margin-top: 0; }
.docs-nav a { display: block; color: var(--muted); padding: 6px 12px; border-radius: 8px; border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--text); background: rgba(0, 0, 0, 0.04); text-decoration: none; }
.docs-nav a.active { color: var(--text); background: rgba(31, 181, 168, 0.12); border-left-color: var(--teal); }
.toc { position: sticky; top: 88px; font-size: 13.5px; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc h5 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.toc a { display: block; color: var(--dim); padding: 4px 0 4px 12px; border-left: 1px solid var(--line); }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--teal); text-decoration: none; }

/* The docs menu button is a grid child: hide it where the menu is always visible. */
.docs-layout > .nav-toggle { display: none; }
.doc { min-width: 0; }
.doc .crumbs { color: var(--dim); font-size: 13.5px; margin-bottom: 10px; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 14px; }
.doc .intro { font-size: 19px; color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 26px; letter-spacing: -0.015em; margin: 56px 0 14px; padding-top: 8px; border-top: 1px solid var(--line); padding-top: 32px; }
.doc h3 { font-size: 19px; margin: 34px 0 10px; }
.doc h4 { font-size: 16px; margin: 24px 0 8px; color: var(--text); }
.doc p, .doc li { color: var(--text-2); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); }
.doc :not(pre) > code { overflow-wrap: anywhere; }
.doc pre {
  background: var(--term-bg); border: 1px solid #000; border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; line-height: 1.55; color: var(--term-text); position: relative;
}
.doc pre .copy {
  position: absolute; top: 8px; right: 8px; font-family: var(--sans); font-size: 12px;
  background: var(--term-bar); color: #b5c0ca; border: 1px solid #000; border-radius: 6px;
  padding: 3px 9px; cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.doc pre:hover .copy { opacity: 1; }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--panel-2); color: var(--text); font-weight: 600; white-space: nowrap; }
.doc tr:last-child td { border-bottom: none; }
.doc td { color: var(--text-2); }
.doc figure { margin: 26px 0; }
.doc figure .window { box-shadow: var(--shadow); }
.doc figcaption { color: var(--dim); font-size: 13.5px; margin-top: 10px; text-align: center; }

.note { border: 1px solid var(--line); border-left: 3px solid var(--teal); background: rgba(31, 181, 168, 0.08); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.note.warn { border-left-color: var(--amber); background: rgba(240, 164, 58, 0.07); }
.note.danger { border-left-color: var(--red); background: rgba(239, 91, 91, 0.07); }
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.note b:first-child { display: block; margin-bottom: 4px; color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.card { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--panel); box-shadow: var(--shadow-sm); color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.card:hover { border-color: rgba(18, 150, 139, 0.6); text-decoration: none; transform: translateY(-2px); }
.card b { display: block; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14.5px; }

.method { scroll-margin-top: 84px; }
.method h3 { font-family: var(--mono); font-size: 18px; color: var(--teal); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; font-family: var(--sans); }
.badge.signed { background: rgba(217, 128, 25, 0.12); color: var(--amber); border: 1px solid rgba(240, 164, 58, 0.35); }
.badge.live { background: rgba(51, 166, 77, 0.12); color: var(--green); border: 1px solid rgba(29, 179, 122, 0.35); }

.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 64px; }
.pager a { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--text); background: var(--panel); }
.pager a:hover { border-color: var(--teal); text-decoration: none; }
.pager a small { display: block; color: var(--dim); font-size: 12.5px; }
.pager a.next { text-align: right; }

.cta-band .grad-text { background: none; color: #7fe3d9; }

/* ---------- Two readers: the person and the agent ---------- */
.readers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reader { min-width: 0; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px 28px; border-top: 4px solid var(--brand); }
.reader.agent { border-top-color: var(--navy); }
.reader h3 { margin: 6px 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.reader p { color: var(--muted); margin: 0 0 14px; }
.reader .who { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.reader pre { margin: 0; background: var(--term-bg); color: var(--term-text); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; overflow-x: auto; line-height: 1.5; }

/* ---------- Pillars ---------- */
.pillar-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; margin-right: 8px; vertical-align: 2px; }

/* ---------- Compact "also" grid ---------- */
.also { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.also .feature { padding: 18px 20px; }
.also .feature h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.also .feature .ico { width: 30px; height: 30px; font-size: 15px; margin: 0; border-radius: 8px; flex: none; }
.also .feature p { font-size: 14.5px; margin-top: 4px; }

/* ---------- Menu bar mock: white to red gauge as in the app ---------- */
/* ---------- Menu bar replica (menubar.js) ---------- */
[data-menubar] { --mb-scale: 1; }
.mb-items { display: flex; align-items: center; gap: calc(6px * var(--mb-scale)); }
.mb-item { display: block; height: calc(22px * var(--mb-scale)); width: calc(var(--w) * 1px * var(--mb-scale)); overflow: visible; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.menubar { display: flex; justify-content: center; padding: 4px 14px; border-radius: 10px; background: rgba(30, 32, 36, 0.92); box-shadow: var(--shadow); width: fit-content; max-width: 100%; overflow: hidden; margin: 0 auto; --mb-scale: 1.3; }
.mb-demo { --mb-scale: 2; }
.mb-desktop { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); min-height: 150px;
  background: radial-gradient(120% 140% at 15% 110%, #1fb5a8 0%, rgba(31, 181, 168, 0) 55%), radial-gradient(90% 120% at 95% 0%, #3b5bdb 0%, rgba(59, 91, 219, 0) 60%), linear-gradient(160deg, #0b4a7a, #13233a); }
.mb-bar { display: flex; align-items: center; gap: 22px; padding: 6px 22px; background: rgba(20, 24, 32, 0.55); backdrop-filter: blur(20px); color: #fff; font: 500 calc(13px * var(--mb-scale) / 1.4) var(--sans); white-space: nowrap; }
.mb-apple::before { content: "\f8ff"; font-size: 1.2em; }
.mb-app { opacity: 0.85; word-spacing: 0.6em; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.mb-bar .mb-items { flex: none; margin-left: auto; }
.mb-sys { opacity: 0.85; flex: none; }
.mb-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 24px; }
.mb-group { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); overflow: hidden; }
.mb-group small { padding: 0 10px; color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.mb-controls button { font: 500 14px var(--sans); color: var(--text-2); background: none; border: 0; border-left: 1px solid var(--line); padding: 8px 12px; cursor: pointer; }
.mb-controls button[aria-pressed="true"] { background: var(--text); color: #fff; }
.mb-controls .mb-busy { border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.mb-controls .mb-busy[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.mb-note { text-align: center; color: var(--muted); margin: 14px 0 0; min-height: 1.5em; }
.mb-features { margin-top: 56px; }
.center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .toc { display: none; }
  .callout { display: none; }
}
@media (max-width: 900px) {
  .mb-demo { --mb-scale: 1.4; }
  .mb-app, .mb-sys { display: none; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-text { order: 0; }
  .arch { grid-template-columns: 1fr; }
  .arch-link .line { width: 2px; height: 40px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-layout > .nav-toggle { display: inline-flex; justify-self: start; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: none; }
  .docs-nav.open { display: block; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 18px 24px; border-bottom: 1px solid var(--line); align-items: flex-start; }
  .nav-toggle { display: block; }
  .privacy-grid, .cards, .readers { grid-template-columns: 1fr; }
  .also { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .mb-demo { --mb-scale: 1; }
  .mb-bar { justify-content: center; overflow: hidden; padding: 6px 12px; }
  .mb-apple { display: none; }
  .menubar { --mb-scale: 1; }
  .mb-group small { display: none; }
  .mb-controls button { padding: 7px 9px; font-size: 13px; }
  .features, .steps, .facts, .also { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
  .hero { padding-top: 64px; }
}

/* Terminal playback (index #investigate) */
.term-play { max-width: 980px; margin-inline: auto; }
.term-play pre { font-size: 13px; min-height: 30em; }
.term-play .term-line { display: none; }
.term-play .term-line.on { display: inline; }
.t-agent { color: #b69cff; }
.t-cmd { color: var(--term-text); }
.term-replay { margin-left: auto; background: none; border: 1px solid #3a4550; color: #8b96a1; border-radius: 6px; font-size: 12px; padding: 2px 10px; cursor: pointer; }
.term-replay:hover { color: var(--term-text); border-color: #5b6772; }
.term-note { margin-top: 20px; }
