/* The chrome every public page shares: the header with its burger menu, and the footer. Rendered by demo/chrome.py.
   Same tokens as the pages (declared again here so the chrome stands on its own); one column at 375 px;
   every control at least 44 px tall. Under 900 px the primary links fold into the menu. */
:root { --bg:#f5f7fa; --panel:#ffffff; --ink:#111827; --body:#374151; --muted:#6b7280; --line:#e5e7eb; --accent:#2662d9; --accent-ink:#ffffff; --chip:#e8effc; --soft:#f9fafb;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --nav:58px; }

header.site { position:sticky; top:0; z-index:20; background:rgba(245,247,250,.94); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); font-family:var(--sans); }
header.site > .wrap { display:flex; align-items:center; gap:14px; min-height:var(--nav); padding:0 20px; max-width:1100px; margin:0 auto; position:relative; }
header.site .brand { font-weight:750; text-decoration:none; color:var(--ink); font-size:17px; display:flex; align-items:center; gap:9px; white-space:nowrap; min-height:44px; }
header.site .brand .mark { width:26px; height:26px; border-radius:7px; background:#000; display:block; object-fit:cover; }
header.site nav.primary { display:flex; gap:2px; margin-left:8px; font-size:14.5px; min-width:0; }
header.site nav.primary a { color:var(--body); text-decoration:none; padding:10px 10px; min-height:44px; display:inline-flex; align-items:center; white-space:nowrap; border-radius:8px; }
header.site nav.primary a:hover { color:var(--ink); background:var(--chip); }
header.site nav.primary a[aria-current="page"] { color:var(--accent); font-weight:650; background:var(--chip); }
header.site .cta { margin-left:auto; flex:none; display:inline-flex; align-items:center; justify-content:center; font:inherit; font-weight:650; font-size:14px; border-radius:10px; padding:7px 14px; min-height:44px; text-decoration:none; border:1px solid var(--accent); background:var(--accent); color:var(--accent-ink); white-space:nowrap; }
header.site .cta:hover { filter:brightness(1.05); }

/* The menu: a <details>, so it works without JavaScript; the script only closes it after a choice. */
header.site details.menu { flex:none; }
header.site details.menu > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:44px; min-height:44px; padding:0 8px; border-radius:10px; color:var(--ink); font-size:14px; font-weight:650; border:1px solid transparent; }
header.site details.menu > summary::-webkit-details-marker { display:none; }
header.site details.menu > summary:hover, header.site details.menu[open] > summary { background:var(--chip); border-color:var(--line); }
header.site .bars { position:relative; width:18px; height:12px; display:inline-block; }
header.site .bars::before, header.site .bars::after, header.site .bars i { content:""; position:absolute; left:0; right:0; height:2px; border-radius:2px; background:currentColor; }
header.site .bars::before { top:0; } header.site .bars i { top:5px; } header.site .bars::after { bottom:0; }
header.site details.menu[open] .bars::before { top:5px; transform:rotate(45deg); } header.site details.menu[open] .bars::after { bottom:5px; transform:rotate(-45deg); } header.site details.menu[open] .bars i { opacity:0; }
header.site nav.panel { position:absolute; right:20px; left:auto; top:calc(100% + 6px); width:min(680px, calc(100vw - 32px)); background:var(--panel); border:1px solid var(--line); border-radius:14px; box-shadow:0 14px 40px rgba(17,24,39,.12); padding:10px; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; max-height:calc(100vh - var(--nav) - 16px); overflow:auto; }
header.site nav.panel .group { padding:8px 6px; }
header.site nav.panel .gt { font-size:11.5px; letter-spacing:.09em; text-transform:uppercase; font-weight:700; color:var(--muted); padding:6px 10px 4px; }
header.site nav.panel a { display:flex; align-items:center; min-height:44px; padding:8px 10px; border-radius:8px; color:var(--ink); text-decoration:none; font-size:15px; }
header.site nav.panel a:hover { background:var(--chip); }
header.site nav.panel a[aria-current="page"] { color:var(--accent); font-weight:650; }
header.site nav.panel a small { color:var(--muted); font-size:12.5px; margin-left:auto; padding-left:10px; white-space:nowrap; }

@media (max-width: 899px) {
  header.site nav.primary { display:none; }
  header.site nav.panel { right:16px; width:calc(100vw - 32px); grid-template-columns:minmax(0, 1fr); gap:0; padding:6px; }
  header.site nav.panel .group { padding:6px 4px; border-top:1px solid var(--line); } header.site nav.panel .group:first-child { border-top:0; }
  header.site .menu-word { display:none; }
}
@media (max-width: 600px) {
  :root { --nav:52px; }
  header.site > .wrap { padding:0 16px; gap:8px; }
  header.site .brand { font-size:16px; }
  header.site .cta { padding:6px 12px; font-size:13.5px; }
}
@media (min-width: 900px) {
  header.site details.menu > summary .bars { display:none; }
  header.site .menu-word::after { content:""; display:inline-block; width:6px; height:6px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:0 2px 3px 7px; }
  header.site details.menu[open] .menu-word::after { transform:rotate(225deg); margin-bottom:-2px; }
}

footer.site { margin-top:48px; border-top:1px solid var(--line); background:var(--panel); font-family:var(--sans); color:var(--muted); font-size:14px; }
footer.site > .wrap { max-width:1100px; margin:0 auto; padding:34px 20px 40px; }
footer.site .cols { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:18px 24px; }
footer.site .col h4 { margin:0 0 4px; font-size:11.5px; letter-spacing:.09em; text-transform:uppercase; font-weight:700; color:var(--muted); }
footer.site .col a { display:flex; align-items:center; min-height:40px; padding:4px 0; color:var(--body); text-decoration:none; line-height:1.3; }
footer.site .col a:hover { color:var(--accent); text-decoration:underline; }
footer.site .col a[aria-current="page"] { color:var(--accent); font-weight:650; }
footer.site .fine { margin:26px 0 0; padding-top:18px; border-top:1px solid var(--line); font-size:13px; line-height:1.55; max-width:80ch; }
footer.site .fine b { color:var(--ink); font-weight:650; }
@media (max-width: 899px) { footer.site .cols { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { footer.site > .wrap { padding:26px 16px 36px; } footer.site .cols { gap:14px 16px; } footer.site .col a { min-height:44px; font-size:14.5px; } }
@media (max-width: 330px) { footer.site .cols { grid-template-columns:minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { header.site .bars::before, header.site .bars::after, header.site .bars i { transition:transform .15s ease, top .15s ease, bottom .15s ease, opacity .15s ease; } }
