/* BAIFPO AI — site design system */
:root {
  --ink: #0a1b2a;
  --ink-soft: #24384a;
  --muted: #56687a;
  --surface: #ffffff;
  --surface-2: #f3f8f7;
  --surface-3: #e8f3ef;
  --line: #d6e2e1;
  --line-soft: #e7efee;
  --brand: #0a8f64;
  --brand-2: #14c98d;
  --brand-3: #2ee6a6;
  --brand-ink: #053b2a;
  --critical: #b3261e;
  --major: #c2410c;
  --moderate: #a16207;
  --minor: #2563eb;
  --info: #56687a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -28px rgba(8, 45, 37, .38);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --grad: linear-gradient(135deg, #0a8f64 0%, #14b981 48%, #2ee6a6 100%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fbfdfc;
  font: 16px/1.62 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: #0a7a5a; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
.shell { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.shell.narrow { width: min(820px, calc(100% - 40px)); }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 10px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 12px; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 28px; }
.center-actions { justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(10,27,42,.08); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #0aa06f, #0ea5e9 35%, #8b5cf6 70%, #f59e0b); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand img { border-radius: 8px; box-shadow: 0 6px 16px -6px rgba(16,185,129,.6); }
.brand small { color: var(--brand); font-size: .72em; letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .92rem; padding: 8px 11px; border-radius: 8px; }
.nav-links a:hover { background: #e8f8f1; color: #065c43; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: .95rem; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, filter .15s ease; }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn-primary { background: var(--grad); color: #fff; border-color: rgba(255,255,255,.4); text-shadow: 0 1px 2px rgba(4,45,32,.28); box-shadow: 0 14px 30px -12px rgba(16,185,129,.65); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 38px -12px rgba(16,185,129,.78); filter: saturate(1.08); }
.btn-secondary { background: linear-gradient(135deg, #1e40af 0%, #2563eb 46%, #60a5fa 100%); color: #fff; border-color: rgba(255,255,255,.38); text-shadow: 0 1px 2px rgba(6,26,64,.32); box-shadow: 0 14px 30px -12px rgba(37,99,235,.58); }
.btn-secondary:hover { transform: translateY(-1px); filter: saturate(1.08); }
.btn-ghost { background: var(--grad); color: #fff; border-color: rgba(255,255,255,.4); text-shadow: 0 1px 2px rgba(4,45,32,.28); }

/* Type */
h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -.025em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin: 0 0 18px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); margin: 0 0 14px; }
h3 { font-size: 1.12rem; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(1.04rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 720px; }
.eyebrow { display: inline-block; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.gradient { background: linear-gradient(120deg, #0a8f64, #14c98d 42%, #7c5cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: #e8f8f1; color: #065c43; border: 1px solid #c8ebdc; border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 800; margin-bottom: 18px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 3px rgba(20,201,141,.18); }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
pre code { background: none; border: 0; padding: 0; }
pre { margin: 0; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: linear-gradient(180deg, #f1f9f6 0%, #eef5ff 55%, #f8f3ff 100%); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-inline: auto; }
.page-head { padding: 64px 0 30px; background: linear-gradient(180deg, #f1f9f6, #fbfdfc); border-bottom: 1px solid var(--line-soft); }
.page-head .lead { margin-bottom: 0; }
.hero { padding: 72px 0 64px; background: radial-gradient(900px 420px at 82% 8%, rgba(46,230,166,.20), transparent 62%), radial-gradient(700px 380px at 4% 16%, rgba(124,92,255,.12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 12px; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px -34px rgba(7,24,35,.42); padding: 18px; transform: rotate(.4deg); }
.hero-card-head { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: .9rem; }
.hero-card-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); }
.score-pill { margin-left: auto; background: #053b2a; color: #d9fbe9; border-radius: 9px; padding: 5px 9px; font-size: .9rem; font-weight: 900; }
.score-pill span { opacity: .65; font-size: .72em; }
.bar { height: 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 13px 0 16px; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.bar span.static { width: 86%; }
progress { width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--grad); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--grad); border-radius: 99px; }
.finding-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.finding-list li { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--ink-soft); }
.hero-card-foot { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-soft); margin-top: 16px; padding-top: 12px; color: var(--muted); font-size: .76rem; font-weight: 700; }

/* Cards and grids */
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(8,28,24,.04); }
.feature { padding: 22px; display: flex; flex-direction: column; }
.feature p { color: var(--muted); font-size: .92rem; }
.feature a { margin-top: auto; font-weight: 700; font-size: .9rem; text-decoration: none; }
.feature a:hover { text-decoration: underline; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #e8f8f1; color: #065c43; font-weight: 900; font-size: 1rem; margin-bottom: 14px; border: 1px solid #c8ebdc; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: start; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.steps li { padding-left: 4px; color: var(--ink-soft); }
.steps strong { color: var(--ink); }
.note-card { padding: 24px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checklist li { position: relative; padding-left: 25px; color: var(--ink-soft); font-size: .93rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 900; }
.questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.questions li { position: relative; padding-left: 25px; color: var(--ink-soft); font-size: .93rem; }
.questions li::before { content: "?"; position: absolute; left: 2px; top: 0; color: var(--moderate); font-weight: 900; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(120deg, #053b2a, #087a55 60%, #0fa673); color: #eafff7; border-radius: 20px; padding: 30px 32px; box-shadow: 0 24px 60px -30px rgba(5,59,42,.55); }
.cta-band h3 { color: #fff; font-size: 1.5rem; }
.cta-band p { color: #c9f4e3; margin: 0; max-width: 600px; }
.cta-band .btn-secondary { box-shadow: none; }
.cta-band .btn-primary { background: #fff; color: #053b2a; border-color: #fff; text-shadow: none; }
.cta-band .btn-primary:hover { filter: none; }

/* Prose */
.prose { max-width: 820px; }
.prose h2 { margin-top: 38px; font-size: 1.55rem; }
.prose h3 { margin-top: 22px; font-size: 1.05rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 22px; }
.prose table, .tool-table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 16px 0; }
.prose th, .prose td, .tool-table-wrap th, .tool-table-wrap td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th, .tool-table-wrap th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tool-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tool-table-wrap table { margin: 0; min-width: 640px; }
.code-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 12px 0 20px; }
.code-row code { background: transparent; border: 0; padding: 0; font-size: .88rem; flex: 1; }
.example { border-left: 3px solid var(--brand-2); background: var(--surface-2); padding: 12px 15px; border-radius: 0 10px 10px 0; margin: 12px 0; }
.example span { display: inline-block; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 4px; }
.example p { margin: 0; }
.docs-grid { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 96px; display: grid; gap: 2px; border-left: 2px solid var(--line); padding-left: 14px; }
.toc a { color: var(--muted); text-decoration: none; font-size: .86rem; font-weight: 650; padding: 5px 0; }
.toc a:hover { color: var(--brand); }

/* FAQ / support */
.faq { display: grid; gap: 10px; margin-bottom: 26px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 750; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); font-size: .93rem; }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px; margin-top: 26px; }
.contact-card h2 { margin-bottom: 6px; font-size: 1.35rem; }
.contact-card p { margin: 0; }
.contact-card .actions { margin: 0; }

/* Demo */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.demo-card { padding: 22px; }
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.demo-head h2 { margin: 0; font-size: 1.4rem; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.kv div { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px; }
.kv span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kv strong { font-size: .92rem; }
.finding-cards { display: grid; gap: 10px; }
.finding-card { padding: 14px 16px; }
.finding-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.finding-card p { margin: 7px 0 0; }
.tag { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line); color: var(--info); background: #fff; }
.tag.critical { color: var(--critical); border-color: #f0c9c6; background: #fff5f4; }
.tag.major { color: var(--major); border-color: #f3d2bd; background: #fff8f2; }
.tag.moderate { color: var(--moderate); border-color: #f0e0b8; background: #fffbef; }
.tag.minor { color: var(--minor); border-color: #c9d8f7; background: #f3f7ff; }
.tag.info { color: var(--info); }
.copy-field { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px; }
.copy-field:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.copy-head span { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); }
.copy-field p { margin: 0; overflow-wrap: anywhere; }
.code-block { background: #0b1f1a; color: #d9fbe9; border-radius: 9px; padding: 12px; font-family: var(--mono); font-size: .76rem; overflow: auto; max-height: 240px; white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: .8rem; }
details summary { font-weight: 700; cursor: pointer; }
details p, details ul { margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #f7fbf9; padding: 40px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 30px; }
.footer-brand { margin-bottom: 10px; }
.footer-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 4px 0 10px; }
.footer-grid > div > a { display: block; text-decoration: none; color: var(--ink-soft); font-size: .88rem; padding: 3px 0; }
.footer-grid > div > a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); margin-top: 28px; padding-top: 18px; font-size: .78rem; color: var(--muted); }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .demo-grid { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, 1fr); }
  .docs-grid { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .contact-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
  .shell, .shell.narrow { width: min(100% - 28px, 1140px); }
  .grid.three { grid-template-columns: 1fr; }
  .nav { min-height: 64px; }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 48px 0 42px; }
  .section { padding: 52px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .cta-band { padding: 24px; }
  .actions .btn { flex: 1 1 auto; }
  .demo-head { flex-direction: column; }
  .kv { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
