/* Shared look for every page except the homepage (static/home/a.html, b.html).
   The homepage split test shows design "a" (light) or "b" (dark) and keeps the
   choice in the wd_home cookie; each page's first <script> copies it to
   <html data-theme>, so the rest of the site matches the homepage a visitor saw.
   Without the cookie (or without JavaScript) a page shows "a".

   The tokens keep the names the pages already used (--bg-primary, --accent, ...),
   so a page's own component styles work in both themes. When the test ends,
   delete the losing theme's block. */

@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:500 700;font-display:swap;src:url(/static/fonts/space-grotesk-latin.woff2) format("woff2")}

:root,[data-theme="a"]{
  color-scheme:light;
  --bg-primary:#F5F6F8;--bg-secondary:#FFFFFF;--bg-card:#FFFFFF;--bg-code:#EEF0F3;
  --text-primary:#0E1116;--text-secondary:#3D4552;--text-muted:#5B6472;
  --accent:#0A66E8;--accent-hover:#0852BA;--accent-glow:rgba(10,102,232,.10);--on-accent:#FFFFFF;
  --green:#15803D;--yellow:#A16207;--red:#C2410C;
  --border:#E3E6EB;--border-light:#D5D9E0;
  --radius:12px;--nav-height:64px;
  --display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --nav-bg:rgba(245,246,248,.92);--cta-bg:#0E1116;--cta-ink:#FFFFFF;
}
[data-theme="b"]{
  color-scheme:dark;
  --bg-primary:#0B0C0E;--bg-secondary:#16181C;--bg-card:#16181C;--bg-code:#1F2226;
  --text-primary:#F2F3F5;--text-secondary:#C5CAD3;--text-muted:#A3A9B4;
  --accent:#30D158;--accent-hover:#5BE37E;--accent-glow:rgba(48,209,88,.14);--on-accent:#04140A;
  --green:#30D158;--yellow:#FFD60A;--red:#FF6961;
  --border:#23262C;--border-light:#3A3F47;
  --radius:12px;--nav-height:64px;
  --display:"Space Grotesk",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --nav-bg:rgba(11,12,14,.9);--cta-bg:#30D158;--cta-ink:#04140A;
}

html{background:var(--bg-primary)}
body{background:var(--bg-primary);color:var(--text-primary)}
h1,h2,h3{font-family:var(--display)}
[data-theme="b"] h1,[data-theme="b"] h2,[data-theme="b"] h3{letter-spacing:-.03em}

/* Header: the same links as the homepage. */
.site-nav{position:fixed;top:0;left:0;right:0;z-index:1000;min-height:var(--nav-height);background:var(--nav-bg);
  border-bottom:1px solid var(--border);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px)}
.site-nav-in{max-width:1200px;margin:0 auto;padding:0 24px;min-height:var(--nav-height);display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.site-brand{display:flex;align-items:center;gap:10px;margin-inline-end:auto;text-decoration:none;color:var(--text-primary);font-weight:700;font-size:18px;line-height:1}
.site-brand:hover{color:var(--text-primary)}
/* The brand is dir="ltr" (the wordmark never flips), so its inline-end is always its right side:
   on a right-to-left page the gap has to go on its left, or the whole bar bunches up on the left. */
[dir="rtl"] .site-brand{margin-right:0;margin-left:auto}
.site-logo{width:28px;height:28px;border-radius:8px;background:var(--text-primary);display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:6px}
.site-logo span{border-radius:2px}
.site-word-b{display:none;font-family:var(--display);font-size:21px;letter-spacing:-.02em}
.site-word-b em{font-style:normal;color:var(--accent)}
[data-theme="b"] .site-logo,[data-theme="b"] .site-word-a{display:none}
[data-theme="b"] .site-word-b{display:inline}
.site-links{display:flex;align-items:center;gap:4px 22px;font-size:15px;font-weight:500}
.site-links a{color:var(--text-secondary);text-decoration:none;padding:10px 0}
.site-links a:hover{color:var(--text-primary)}
.site-cta{background:var(--cta-bg);color:var(--cta-ink);text-decoration:none;padding:9px 16px;border-radius:999px;font-weight:600;font-size:14px;line-height:1.2}
[data-theme="b"] .site-cta{border-radius:10px;font-weight:700}
.site-cta:hover{color:var(--cta-ink);opacity:.9}
.site-toggle{display:none;background:none;border:1px solid var(--border-light);border-radius:10px;padding:8px 12px;font:inherit;font-size:14px;font-weight:600;color:var(--text-primary);cursor:pointer;line-height:1.2}
@media (max-width:760px){
  .site-toggle{display:inline-block}
  .site-links{display:none;order:3;width:100%;flex-direction:column;align-items:flex-start;gap:0;padding:4px 0 12px}
  .site-links.open{display:flex}
  .site-links a{padding:10px 0;width:100%}
  .site-nav-in{padding:0 16px}
}

/* Footer */
.site-foot{border-top:1px solid var(--border);background:var(--bg-secondary);margin-top:48px}
.site-foot-in{max-width:1200px;margin:0 auto;padding:40px 24px;display:flex;flex-wrap:wrap;gap:12px 24px;font-size:14px;line-height:1.5;color:var(--text-muted)}
.site-foot-in > b{color:var(--text-primary);margin-inline-end:auto;font-family:var(--display)}
[dir="rtl"] .site-foot-in > b{margin-right:0;margin-left:auto}
.site-foot-in a{color:var(--text-secondary);text-decoration:none}
.site-foot-in a:hover{color:var(--text-primary);text-decoration:underline}
.site-foot-copy{width:100%;margin:8px 0 0;font-size:13px;color:var(--text-muted)}

/* Buttons that sit on the accent color need the theme's ink, not white. */
.btn-primary,.btn-primary:hover{color:var(--on-accent)}
