/* ==========================================================================
   site.css — the ONE stylesheet for every server-rendered marketing/SEO page
   (landing, coverage, changelog, legal). Loaded by templates/site/base.html.

   Contains: design tokens, reset + typography, layout, buttons, header/nav,
   footer, and the primitives that genuinely appear on more than one page.
   Page-specific furniture lives in its own sheet (home.css, coverage.css,
   changelog.css, legal.css) loaded via {% block extra_css %}.

   Typography is promoted verbatim from landing/index.html — it is the design
   reference. Do not re-declare a base font-size on <body> in a page sheet:
   that is exactly how the five old copies drifted apart.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root{
  /* surfaces */
  --bg:#ffffff;
  --bg-soft:#fafafa;

  /* text */
  --fg:#09090b;          /* headings, primary text            zinc-950 */
  --fg-soft:#27272a;     /* UI secondary text                 zinc-800 */
  --fg-soft-2:#3f3f46;   /* prose / table body                zinc-700 */
  --muted-strong:#52525b;/* dense meta, neutral pills         zinc-600 */
  --muted:#71717a;        /* muted copy                        zinc-500 */
  --muted-2:#a1a1aa;      /* microcopy, footnotes              zinc-400 */

  /* lines */
  --border:#e4e4e7;
  --border-soft:#f4f4f5;

  /* accent (emerald) */
  --accent:#10b981;
  --accent-fg:#047857;
  --accent-bg:#ecfdf5;
  --accent-bd:#a7f3d0;

  /* status */
  --amber-fg:#b45309; --amber-bg:#fffbeb; --amber-bd:#fde68a;
  --red-fg:#b91c1c;   --red-bg:#fef2f2;   --red-bd:#fecaca;

  /* dark surfaces (code windows, CTA bands, Pro plan card) */
  --dark:#09090b;
  --dark-2:#18181b;
  --dark-border:#27272a;

  /* shape */
  --radius:14px;
  --radius-sm:10px;
  --radius-xs:8px;

  /* elevation */
  --shadow-sm:0 1px 2px rgba(0,0,0,.05);
  --shadow:0 4px 24px -8px rgba(0,0,0,.12);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,.35);

  /* type */
  --font:'Geist',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,sans-serif;
  --mono:'Geist Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

/* --------------------------------------------------------------------------
   2. Reset + base typography (from index.html — the reference)
   No base font-size: root stays 16px on every page.
   -------------------------------------------------------------------------- */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--font);
  color:var(--fg);
  background:var(--bg);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none}
img{max-width:100%}

/* Heading scale. Shared rules never exceed weight 700 — the font link does not
   ship 800, so do not use font-weight:800 in a page sheet. */
h1,h2,h3{letter-spacing:-.02em;color:var(--fg);font-weight:600}
.h1{font-size:clamp(32px,5vw,44px);line-height:1.08;font-weight:700}
.h2{font-size:clamp(28px,4vw,40px);line-height:1.1;font-weight:600}
.h3{font-size:20px;font-weight:600}
.lead{color:var(--muted);font-size:18px;line-height:1.6}
.mono{font-family:var(--mono)}

.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:var(--fg);color:#fff;
  padding:10px 16px;border-radius:0 0 var(--radius-sm) 0;font-size:14px}
.skip-link:focus{left:0}

/* --------------------------------------------------------------------------
   3. Layout
   .wrap is the single content rail — header and footer use it, so every page
   is aligned. Modifiers narrow it for specific page bodies.
   -------------------------------------------------------------------------- */
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}
.wrap--wide{max-width:1180px}    /* changelog feed 2-column layout */
.wrap--narrow{max-width:1000px}  /* coverage tables                */
.wrap--prose{max-width:820px}    /* legal / long-form reading       */

.section{padding:96px 0}
.center{text-align:center}
.section-head{max-width:680px;margin:0 auto 56px}
.section-head.center{text-align:center}

/* Inner-page hero (coverage, changelog, legal). The homepage hero is richer
   and lives in home.css as .hero. */
.page-hero{max-width:820px;margin:0 auto;text-align:center;padding:56px 24px 8px}

.crumbs{font-size:12.5px;color:var(--muted);padding:22px 0 0}
.crumbs a{color:var(--fg-soft-2)}
.crumbs a:hover{color:var(--accent-fg)}

/* --------------------------------------------------------------------------
   4. Buttons
   Base .btn has a transparent border and NO background — always pair it with a
   variant (.btn-primary / .btn-outline / .btn-light).
   -------------------------------------------------------------------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:44px;padding:0 20px;border-radius:var(--radius-sm);font-size:15px;font-weight:500;
  font-family:inherit;cursor:pointer;border:1px solid transparent;transition:all .18s ease;white-space:nowrap}
.btn svg{width:16px;height:16px}
.btn-primary{background:var(--fg);color:#fff}
.btn-primary:hover{background:#27272a;transform:translateY(-1px)}
.btn-outline{background:var(--bg);border-color:var(--border);color:var(--fg)}
.btn-outline:hover{background:var(--bg-soft)}
.btn-light{background:#fff;color:var(--dark)}          /* for use on dark bands */
.btn-light:hover{background:#e4e4e7;transform:translateY(-1px)}
.btn-sm{height:38px;padding:0 16px;font-size:14px;border-radius:9px}

/* --------------------------------------------------------------------------
   5. Header / nav
   <header> is the sticky bar; .nav is the inner flex row inside .wrap.
   The border only appears once scrolled (JS toggles header.scrolled).
   -------------------------------------------------------------------------- */
/* Scoped to the site bar by ID, NOT the bare `header` element: pages legitimately
   use <header> for their own hero (coverage, changelog feed), and an element
   selector made those sticky too — a hero frozen over the scrolling content. */
#header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.78);
  backdrop-filter:saturate(160%) blur(12px);border-bottom:1px solid transparent;transition:border-color .2s}
#header.scrolled{border-bottom-color:var(--border)}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}

.brand{display:flex;align-items:center;gap:9px;font-weight:600;font-size:16px;letter-spacing:-.02em}
.brand img{border-radius:var(--radius-xs);flex:0 0 auto}

.nav-links{display:flex;align-items:center;gap:30px}
.nav-links a{font-size:14px;color:var(--muted);font-weight:500;transition:color .15s}
.nav-links a:hover{color:var(--fg)}
.nav-links a.active{color:var(--fg)}

.nav-cta{display:flex;align-items:center;gap:10px}
.nav-cta .signin{font-size:14px;font-weight:500;color:var(--fg);padding:0 6px}

.burger{display:none;background:none;border:1px solid var(--border);border-radius:9px;
  width:40px;height:40px;cursor:pointer;color:var(--fg)}
.burger svg{width:20px;height:20px}

.mobile-menu{display:none;border-top:1px solid var(--border);background:#fff;padding:14px 24px 20px}
.mobile-menu a{display:block;padding:11px 0;font-size:15px;color:var(--fg-soft);border-bottom:1px solid var(--border-soft)}
.mobile-menu a.active{color:var(--accent-fg)}
.mobile-menu .btn{width:100%;margin-top:14px}

/* --------------------------------------------------------------------------
   6. Footer (the complete multi-column footer, on every page)
   -------------------------------------------------------------------------- */
/* Same reasoning as #header — scope the site footer, don't style every <footer>. */
#site-footer{border-top:1px solid var(--border);padding:56px 0 36px;margin-top:40px}
.foot-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:32px;margin-bottom:40px}
.foot-col h4{font-size:13px;font-weight:600;margin-bottom:14px;color:var(--fg)}
.foot-col a{display:block;font-size:14px;color:var(--muted);padding:5px 0;transition:color .15s}
.foot-col a:hover{color:var(--fg)}
.foot-brand p{font-size:14px;color:var(--muted);margin-top:12px;max-width:280px;line-height:1.6}
.foot-bottom{border-top:1px solid var(--border);padding-top:24px;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
.foot-bottom p{font-size:13px;color:var(--muted-2)}
.disclaimer{font-size:12.5px;color:var(--muted-2);max-width:760px;line-height:1.6;margin-top:10px}

/* --------------------------------------------------------------------------
   7. Shared primitives
   -------------------------------------------------------------------------- */

/* eyebrow / kicker pill above a heading */
.eyebrow{display:inline-flex;align-items:center;gap:7px;
  font-size:13px;font-weight:500;color:var(--muted);
  border:1px solid var(--border);background:var(--bg);
  padding:5px 12px;border-radius:999px;box-shadow:var(--shadow-sm)}
.eyebrow svg{width:14px;height:14px;color:var(--accent)}
.eyebrow .st{color:var(--accent-fg);font-weight:600}

/* centred check-list row under a hero */
.microcopy{font-size:13.5px;color:var(--muted-2);display:flex;gap:18px;justify-content:center;flex-wrap:wrap}
.microcopy span{display:inline-flex;align-items:center;gap:6px}
.microcopy svg{width:14px;height:14px;color:var(--accent)}

/* generic grids */
.grid{display:grid;gap:18px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}

/* card = plain surface. The padded, lifting marketing card is .card--feature
   in home.css; a table/list card just uses .card and pads its own children. */
.card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-sm);overflow:hidden}
.card-head{padding:15px 18px;border-bottom:1px solid var(--border-soft);font-weight:600;font-size:15px}

/* status pill */
.pill{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;
  padding:4px 11px;border-radius:999px;border:1px solid var(--border);
  background:var(--bg-soft);color:var(--fg-soft-2);white-space:nowrap}
.pill .dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 auto}
.pill.ok{color:var(--accent-fg);background:var(--accent-bg);border-color:var(--accent-bd)}
.pill.soon,.pill.warn{color:var(--amber-fg);background:var(--amber-bg);border-color:var(--amber-bd)}
.pill.no{color:var(--muted-strong);background:var(--border-soft);border-color:var(--border)}

/* inline badges next to a heading */
.badge-new,.badge-soon{display:inline-block;font-size:10.5px;font-weight:600;letter-spacing:.04em;
  text-transform:uppercase;padding:2px 8px;border-radius:999px;margin-left:8px;vertical-align:middle}
.badge-new{color:var(--accent-fg);background:var(--accent-bg);border:1px solid var(--accent-bd)}
.badge-soon{color:var(--muted);background:var(--bg-soft);border:1px solid var(--border)}
.badge-soon.dark{color:var(--muted-2);background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.18)}
.badge-new.dark{color:#6ee7b7;background:rgba(16,185,129,.13);border-color:rgba(16,185,129,.3)}

/* big-number stat triple */
.stats{display:flex;gap:40px;flex-wrap:wrap;margin:26px 0}
.stats .n{font-size:40px;font-weight:700;letter-spacing:-.03em;line-height:1}
.stats .l{color:var(--muted);font-size:13px;margin-top:4px}

/* code window (full) + code chip (compact), one syntax palette for both */
.codewin{max-width:760px;margin:54px auto 0;border-radius:16px;overflow:hidden;
  background:var(--dark);border:1px solid var(--dark-border);box-shadow:var(--shadow-lg);text-align:left}
.codebar{display:flex;align-items:center;gap:7px;padding:13px 16px;border-bottom:1px solid var(--dark-border)}
.codebar .tl{width:11px;height:11px;border-radius:50%}
.tl.r{background:#ff5f57}.tl.y{background:#febc2e}.tl.g{background:#28c840}
.codebar .fn{margin-left:10px;font-family:var(--mono);font-size:12.5px;color:var(--muted)}
.code{padding:18px 20px;font-family:var(--mono);font-size:13px;line-height:1.85;color:#e4e4e7;overflow-x:auto}
.chip-code{margin-top:14px;background:var(--dark);border:1px solid var(--dark-border);border-radius:var(--radius-sm);
  padding:13px 15px;font-family:var(--mono);font-size:12px;line-height:1.8;color:#e4e4e7;overflow:auto}
.code .cm,.chip-code .cm{color:#71717a}   /* comment  */
.code .del,.chip-code .del{color:#fb7185} /* removed  */
.code .add,.chip-code .add{color:#34d399} /* added    */
.code .pr,.chip-code .pr{color:#a1a1aa}   /* prompt   */
.code .k,.chip-code .k{color:#93c5fd}     /* key      */
.code .s,.chip-code .s{color:#fcd34d}     /* string   */
.code .n,.chip-code .n{color:#5eead4}     /* number   */

/* --------------------------------------------------------------------------
   8. Reveal animation
   Gated on html.js (set by base.html) so a page whose JS fails still renders.
   -------------------------------------------------------------------------- */
.reveal{transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1)}
html.js .reveal{opacity:0;transform:translateY(18px)}
html.js .reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html.js .reveal{opacity:1;transform:none;transition:none}
}

/* --------------------------------------------------------------------------
   9. Responsive — two shared breakpoints only: 900px and 760px
   -------------------------------------------------------------------------- */
@media(max-width:900px){
  .g3{grid-template-columns:repeat(2,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .nav-links,.nav-cta .signin,.nav-cta .btn{display:none}
  .nav-cta .burger{display:flex;align-items:center;justify-content:center}
  .mobile-menu.open{display:block}
  .section{padding:72px 0}
  .g2,.g3{grid-template-columns:1fr}
  .stats{gap:26px}
}
