/* AgentPing website. System fonts, no external requests. */
:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-2: #3b4250;
  --muted: #677084;
  --line: #e3e6ec;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-wash: #eaf2fc;
  --good: #1a7f4b;
  --bad: #b42323;
  --code-bg: #0f1623;
  --code-ink: #dbe4f0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --bg-2: #11141b; --surface: #141822; --ink: #eef1f6; --ink-2: #c3c9d5; --muted: #8b93a5;
    --line: #232a37; --accent: #3987e5; --accent-ink: #86b6ef; --accent-wash: #132338; --good: #4ccb87; --bad: #f08a8a;
    --code-bg: #0a0e15; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --bg-2: #11141b; --surface: #141822; --ink: #eef1f6; --ink-2: #c3c9d5; --muted: #8b93a5;
  --line: #232a37; --accent: #3987e5; --accent-ink: #86b6ef; --accent-wash: #132338; --good: #4ccb87; --bad: #f08a8a;
  --code-bg: #0a0e15; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; color: var(--ink-2); }
code, pre, kbd { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
:not(pre) > code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .08em .35em; }
pre {
  position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; line-height: 1.55; margin: 0 0 1.2em; font-size: .86rem;
}
pre .c { color: #7f8ba0; } pre .ok { color: #6fd39a; } pre .bad { color: #ff9b9b; } pre .k { color: #8fc1ff; }
.copy {
  position: absolute; top: 8px; right: 8px; font: 600 12px/1 inherit; color: var(--code-ink); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 6px 8px; cursor: pointer;
}
.copy:hover { background: rgba(255,255,255,.16); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.08rem; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--ink-2); padding: 7px 11px; border-radius: 8px; font-weight: 550; font-size: .95rem; }
.nav a:hover { background: var(--bg-2); text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }
.head-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  padding: 7px 10px; font: inherit; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: .95rem;
  border-radius: 10px; padding: 11px 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: transform .08s ease, background .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.small { padding: 7px 12px; font-size: .9rem; border-radius: 8px; }
.btn.block { width: 100%; }

/* Sections */
section { padding: 84px 0; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 760px; }
.center { text-align: center; } .center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 620px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--accent-ink); }
.hero .lead { margin: 18px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { font-size: .88rem; color: var(--muted); margin-top: 14px; }

.term { background: var(--code-bg); color: var(--code-ink); border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 50%, #000); overflow: hidden; font-size: .84rem; }
.term-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); align-items: center; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4252; display: block; }
.term-bar span { margin-left: 8px; color: #8693a8; font-size: .78rem; }
.term pre { margin: 0; border-radius: 0; background: transparent; font-size: .84rem; }

.logos { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 8px; }
.logos span { color: var(--muted); font-weight: 650; font-size: .98rem; }
.strip { padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip p { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 2px; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-wash);
  color: var(--accent-ink); margin-bottom: 14px; }
.icon svg { width: 22px; height: 22px; }
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 56px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 20px; left: 24px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero .wrap > *, .split > *, .docs > *, .grid > * { min-width: 0; }
.stat { font-size: 1.45rem; font-weight: 750; letter-spacing: -.03em; color: var(--ink); line-height: 1.1; }
.stat + p { margin-top: 4px; font-size: .95rem; }

.matrix { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.matrix th, .matrix td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.matrix thead th { background: var(--bg-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.matrix tr:last-child td { border-bottom: 0; }
.matrix td.y { color: var(--good); font-weight: 650; } .matrix td.n { color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; position: relative; }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan .badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.plan h3 { font-size: 1.15rem; margin-bottom: 4px; }
.plan .for { color: var(--muted); font-size: .9rem; min-height: 3.2em; }
.price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 6px; min-height: 3.4rem; flex-wrap: wrap; }
.price b { font-size: 2.4rem; letter-spacing: -.03em; font-weight: 750; }
.price span { color: var(--muted); font-size: .92rem; }
.price-note { color: var(--muted); font-size: .86rem; min-height: 3.9em; margin-bottom: 16px; }
.plan .ticks { margin: 18px 0 0; font-size: .93rem; }
.plan .btn { margin-top: 0; }
.plan .ticks + .spacer { flex: 1; }
.calc { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.calc output { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 10px 0 0; }

/* Docs */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding: 40px 0 80px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .92rem; }
.toc p { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.toc p:first-child { margin-top: 0; }
.toc a { display: block; color: var(--ink-2); padding: 4px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); text-decoration: none; border-color: var(--muted); }
.toc a.on { color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2em; padding-top: .4em; scroll-margin-top: 80px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; scroll-margin-top: 80px; }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 1.4em; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--accent-wash); border-radius: 8px; padding: 12px 16px; margin: 0 0 1.2em; }
.note p { margin: 0; color: var(--ink); }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs button { font: 600 .85rem/1 inherit; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent-wash); color: var(--accent-ink); border-color: transparent; }
[data-panel][hidden] { display: none; }

/* Examples */
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 22px; }
.example > div { padding: 22px; min-width: 0; }
.example > div + div { border-left: 1px solid var(--line); background: var(--bg-2); }
.example h3 { margin-bottom: 6px; }
.example .tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); margin-bottom: 10px; }
.example pre { font-size: .8rem; margin-bottom: 0; }
.outcome { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; font-size: .88rem; margin: 10px 0 0; }
.outcome.redact { color: var(--good); } .outcome.block { color: var(--bad); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters button { font: 600 .88rem/1 inherit; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* CTA band and footer */
.band { background: linear-gradient(135deg, var(--accent-ink), var(--accent)); color: #fff; border-radius: 20px; padding: 48px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0 0 6px; } .band p { color: rgba(255,255,255,.85); margin: 0; }
.band .btn { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; }
.band .btn.primary { background: #fff; color: var(--accent-ink); border-color: #fff; }
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 36px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.foot-grid a { display: block; color: var(--ink-2); padding: 3px 0; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: .85rem; cursor: pointer; }

/* Responsive */
@media (max-width: 1020px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 36px; }
  .g3 { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .prose table { display: block; overflow-x: auto; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 28px; }
  .example { grid-template-columns: 1fr; }
  .example > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: inline-block; }
  .nav, .head-cta { display: none; }
  .site-head.open .nav, .site-head.open .head-cta { display: flex; }
  .site-head.open .wrap { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 14px; }
  .site-head.open .nav { flex-direction: column; width: 100%; margin: 8px 0 0; order: 3; }
  .site-head.open .head-cta { width: 100%; order: 4; margin: 4px 0 0; }
  .site-head.open .head-cta .btn { flex: 1; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .plans { grid-template-columns: 1fr; }
  .band { padding: 32px 24px; }
  .calc { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
