/* The chrome on every page: the sticky nav (links, GitHub chip, Download), the phone menu sheet and
   the footer. Self-contained: it reads only the color tokens that site.css (manual, features,
   changelog, 404) and home.css (the home page) both define. Blue for anything clickable; red never. */
.sn-wrap { max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
body:not(.home) .sn-wrap { padding-inline: 24px; }
@media (max-width: 480px) { body:not(.home) .sn-wrap { padding-inline: 16px; } }

.sitenav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(11,12,14,.72); border-bottom: 1px solid rgba(255,255,255,.05); }
.sn-in { display: flex; align-items: center; height: 64px; gap: 16px; }
.sn-logo { display: block; flex: none; color: var(--text); }
.sn-logo img { display: block; height: 32px; width: auto; }  /* multiples of 8 keep the lockup's edges on whole pixels */
.sn-links { display: flex; gap: 24px; margin-inline: auto; font-size: 14px; }
.sn-links a { color: var(--text-2); text-decoration: none; padding: 6px 2px; white-space: nowrap; }
.sn-links a:hover { color: var(--text); }
.sn-links a[aria-current="page"] { color: var(--text); box-shadow: 0 2px 0 var(--signal); }

.gh-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text-2); font: 500 12px/1 var(--mono, ui-monospace, Consolas, monospace); text-decoration: none; white-space: nowrap; transition: border-color .2s, color .2s; }
.gh-chip:hover { color: var(--text); border-color: var(--signal); }
.gh-chip svg { flex: none; }

.sn-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--action); color: #fff; font: 600 14px/1 "Geist", "Segoe UI", system-ui, sans-serif; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: background .2s, transform .2s; }
.sn-btn:hover { background: #3A68E0; color: #fff; transform: translateY(-1px); }

.sn-menu { display: none; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; padding: 0; }
.sn-menu:hover { border-color: var(--signal); }
.sn-menu .x { display: none; }
.sn-menu[aria-expanded="true"] .bars3 { display: none; }
.sn-menu[aria-expanded="true"] .x { display: block; }

.sn-sheet { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px clamp(16px, 4vw, 32px) 20px; background: rgba(11,12,14,.97); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(0,0,0,.5); }
.sn-sheet.open { display: block; }
.sn-sheet nav { display: flex; flex-direction: column; }
.sn-sheet nav a { padding: 15px 4px; font-size: 18px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.sn-sheet nav a:hover { color: var(--signal); }
.sn-sheet .sn-sheet-row { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; align-items: flex-start; }
.sn-sheet .gh-chip { height: 34px; font-size: 13px; }
.sn-sheet .sn-btn { height: 48px; width: 100%; font-size: 16px; border-radius: 12px; }

@media (max-width: 1020px) { .sn-links { gap: 16px; } .sn-in { gap: 12px; } .sn-logo img { height: 24px; } }
@media (max-width: 820px) {
  .sn-links, .sn-in > .gh-chip { display: none; }
  .sn-menu { display: inline-flex; }
  .sn-btn { margin-left: auto; }
}
@media (max-width: 820px) { .sn-logo img { height: 32px; } }
@media (max-width: 380px) { .sn-logo img { height: 24px; } .sn-btn { padding: 0 12px; } }
@media (max-width: 340px) { .sn-in { gap: 8px; } .sn-menu { width: 36px; } }
@media (min-width: 821px) { .sn-sheet.open { display: none; } }

/* Footer */
.sitefoot { border-top: 1px solid var(--line); padding-block: 40px; color: var(--muted); font-size: 13px; }
.sf-row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.sf-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sf-brand img { display: block; height: 24px; width: auto; }
.sf-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.sitefoot a { color: var(--muted); }
.sitefoot a:hover { color: var(--text); }
.sitefoot a.sf-ver { font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 12px; }
.sitefoot a.sf-icon { display: inline-flex; align-items: center; margin-block: -3px; padding: 3px 2px; }
.sf-icon svg { display: block; }
.sf-note { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.sf-internal { margin: 8px 0 0; font-size: 12px; color: var(--signal); }  /* ?a9v-internal=1: this browser's visits are marked, not counted */

/* "A9 Voice runs on Windows PCs. On your phone? Send yourself the link": only shown to phones and tablets (js/chrome.js). */
.phone-handoff { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.phone-send { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.phone-send:hover { color: #DCE6FD; }
.phone-note { display: block; margin-top: 4px; color: var(--muted); }
.phone-note:empty { display: none; }
