/* AgentGuard — Marketing Site Shared Styles */
:root {
  --bg: #f7f4ee;
  --ink: #1e1b16;
  --accent: #1b6c4a;
  --muted: #6c645a;
  --card: #ffffff;
  --green: #16a34a;
  --yellow: #ca8a04;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", "Space Grotesk", "Avenir", sans-serif;
  background: radial-gradient(circle at 20% 10%, #f0efe9 0%, var(--bg) 55%);
  color: var(--ink);
}

/* Layout */
.wrap { max-width: 980px; margin: 0 auto; padding: 32px 16px 60px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 32px 16px 60px; }
@media (min-width: 640px) {
  .wrap, .wrap-narrow { padding: 56px 24px 80px; }
}

/* Top nav */
.site-nav {
  display: flex; align-items: center; gap: 20px; font-size: 14px;
  margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid #e8e2d6;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-nav .brand { color: var(--accent); font-weight: 700; text-decoration: none; margin-right: auto; font-size: 15px; }

/* Typography */
h1 { font-size: 28px; line-height: 1.15; margin: 16px 0; }
h2 { margin-top: 40px; }
p { font-size: 16px; line-height: 1.6; }
@media (min-width: 640px) {
  h1 { font-size: 44px; line-height: 1.1; }
  h2 { margin-top: 48px; }
  p { font-size: 18px; }
}
.muted { color: var(--muted); }

/* Links */
.back-link { color: var(--accent); text-decoration: none; font-size: 14px; }
.back-link:hover { text-decoration: underline; }

/* Badge */
.badge { display: inline-block; padding: 6px 10px; border: 1px solid #d7d0c5; border-radius: 999px; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
@media (min-width: 640px) { .badge { font-size: 12px; } }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff; border: none; padding: 12px 18px;
  border-radius: 8px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-size: 15px; text-align: center;
}
.btn:hover { opacity: 0.9; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.secondary:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* CTA row */
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 32px; }
.cta .btn { flex: 1; min-width: 140px; }
@media (min-width: 640px) {
  .cta { margin: 24px 0 40px; }
  .cta .btn { flex: none; min-width: auto; }
}

/* Grid */
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

/* Card */
.card { background: var(--card); padding: 14px; border-radius: 12px; border: 1px solid #e8e2d6; }
.card p { font-size: 14px; }
@media (min-width: 640px) { .card { padding: 18px; } .card p { font-size: 16px; } }

/* Stats bar */
.stats {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; align-items: flex-end;
  margin: 32px 0; padding: 20px 0; border-top: 1px solid #e8e2d6; border-bottom: 1px solid #e8e2d6;
}
.stat { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 52px; }
.stat .num { font-size: 28px; font-weight: 700; color: var(--accent); display: block; }
.stat img { display: block; height: 28px; margin-bottom: 2px; }
.stat .label { font-size: 13px; color: var(--muted); }
@media (min-width: 640px) {
  .stats { gap: 48px; }
  .stat .num { font-size: 32px; }
}

/* Integration badges */
.integrations {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 32px;
}
.integration-badge {
  display: inline-block; padding: 5px 12px; border: 1px solid #d7d0c5; border-radius: 999px;
  color: var(--muted); font-size: 13px; letter-spacing: 0.02em;
}

/* Code block */
.code-wrap { position: relative; margin-top: 24px; }
.code {
  background: #0f1115; color: #e2e8f0; padding: 16px; border-radius: 12px;
  font-family: "IBM Plex Mono", "Fira Code", monospace; font-size: 12px;
  line-height: 1.7; overflow-x: auto; white-space: pre; margin: 0;
}
@media (min-width: 640px) { .code { padding: 20px 24px; font-size: 14px; } }
.code .kw { color: #c084fc; }
.code .fn { color: #60a5fa; }
.code .str { color: #4ade80; }
.code .comment { color: #6b7280; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8; border-radius: 6px; padding: 6px 10px;
  font-size: 12px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 5px; transition: all 0.15s;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); color: #e2e8f0; }
.copy-btn.copied { color: #4ade80; border-color: #4ade80; }
.copy-btn svg { width: 14px; height: 14px; }

/* Pricing */
.pricing-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; } }
.pricing-card { background: var(--card); padding: 20px; border-radius: 12px; border: 1px solid #e8e2d6; display: flex; flex-direction: column; }
@media (min-width: 640px) { .pricing-card { padding: 24px; } }
.pricing-card.highlight { border-color: var(--accent); border-width: 2px; }
.pricing-card h3 { margin: 0 0 4px; }
.pricing-card .price { font-size: 28px; font-weight: 700; margin: 8px 0 16px; }
.pricing-card ul { padding-left: 18px; margin: 0 0 20px; flex: 1; }
.pricing-card li { margin: 6px 0; }
.pricing-card .btn { width: 100%; }

/* Steps */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 16px; }
.step { text-align: center; padding: 16px; }
.step .num { display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }

/* Tables (trust page) */
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e8e2d6; }
th { font-weight: 600; background: rgba(0,0,0,0.02); }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.current { background: #dcfce7; color: var(--green); }
.status.planned { background: #fef9c3; color: var(--yellow); }

/* Testimonials */
.testimonials-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }
.testimonial-card { background: var(--card); padding: 20px; border-radius: 12px; border: 1px solid #e8e2d6; }
.testimonial-card blockquote { margin: 0; font-style: italic; line-height: 1.6; border-left: 3px solid var(--accent); padding-left: 16px; }
.testimonial-card .attribution { margin-top: 12px; font-size: 14px; }

/* FAQ */
.faq { margin-top: 16px; }
.faq details { border: 1px solid #e8e2d6; border-radius: 12px; margin-bottom: 8px; background: var(--card); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 15px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--accent); font-weight: 700; }
.faq details[open] summary::before { content: "− "; }
.faq details div { padding: 0 18px 14px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Footer */
footer { margin-top: 40px; font-size: 14px; color: var(--muted); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 8px; }
.footer-links a { color: var(--accent); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Email capture */
.email-section { margin-top: 48px; text-align: center; }
.email-form { display: flex; gap: 8px; max-width: 420px; margin: 16px auto 0; flex-wrap: wrap; justify-content: center; }
.email-form input[type="email"] {
  flex: 1; min-width: 200px; padding: 12px 16px; border: 1px solid #d7d0c5;
  border-radius: 8px; font-size: 15px; font-family: inherit; background: var(--card); color: var(--ink);
}
.email-form input[type="email"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.email-form button { padding: 12px 20px; }
.email-msg { margin-top: 12px; font-size: 14px; }
.email-msg.ok { color: var(--accent); }
.email-msg.err { color: #c0392b; }

/* Blog-specific */
.article-meta { font-size: 14px; color: var(--muted); margin: 8px 0 32px; }
.article-content h2 { font-size: 22px; margin-top: 36px; }
.article-content h3 { font-size: 18px; margin-top: 28px; }
.article-content p, .article-content li { font-size: 16px; line-height: 1.7; }
.article-content ul, .article-content ol { padding-left: 24px; }
.article-content li { margin: 6px 0; }
.article-content a { color: var(--accent); }

/* CTA box (end of blog posts) */
.cta-box {
  margin: 48px 0 32px; padding: 28px; border-radius: 12px;
  background: linear-gradient(135deg, #f8f6f1, #f0efe9); border: 1px solid #e8e2d6; text-align: center;
}
.cta-box h3 { margin: 0 0 8px; }
.cta-box p { margin: 0 0 16px; font-size: 15px; color: var(--muted); }

/* Blog listing */
.blog-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
.blog-card {
  background: var(--card); padding: 20px; border-radius: 12px; border: 1px solid #e8e2d6;
  text-decoration: none; color: inherit; transition: border-color 0.15s;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.blog-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.blog-card .date { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* Changelog */
.changelog article { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid #e8e2d6; }
.changelog article:last-child { border-bottom: none; }
.changelog h2 { margin-top: 0; font-size: 20px; }
.changelog time { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 12px; }
.changelog ul { padding-left: 20px; }
.changelog li { margin: 6px 0; font-size: 15px; line-height: 1.6; }

/* Quickstart TOC */
.toc { background: var(--card); padding: 16px 20px; border-radius: 12px; border: 1px solid #e8e2d6; margin: 24px 0; }
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.toc a { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.toc a:hover { text-decoration: underline; }
