/* NullMeridian Log chrome: fonts, colour tokens, header, footer, pills.
   Shared by every page. Light first; follows prefers-color-scheme unless a page pins data-theme="light". */

:root {
  color-scheme: dark;
  --ao-bg: #05060A; --ao-surface: #0C0F18; --ao-raised: #121726; --ao-rule: #1D2335;
  --ao-text: #EEF3FB; --ao-text-2: #B4C1D8; --ao-muted: #8391AB;
  --ao-brand: #6E8BFF; --ao-brand-text: #9DB0FF; --ao-accent: #6E8BFF; --ao-accent-hover: #9DB0FF;
  --ao-pill-a: #6E8BFF; --ao-pill-b: #3550D8; --ao-pill-hover-a: #8AA0FF; --ao-pill-hover-b: #4562E6; --ao-on-pill: #05060A;
  --ao-lav: #151C36; --ao-on-lav: #C7D2FF; --ao-sky: #10203A; --ao-on-sky: #B8CCFF; --ao-warm: #1E1A16; --ao-on-warm: #E9D2B5;
  --ao-focus: #9DB0FF;
  --ao-shadow-1: 0 0 0 1px rgba(110, 139, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.45);
  --ao-shadow-2: 0 0 0 1px rgba(110, 139, 255, 0.10), 0 20px 48px rgba(0, 0, 0, 0.55);
  --ao-shadow-lift: 0 0 0 1px rgba(110, 139, 255, 0.14), 0 24px 54px rgba(0, 0, 0, 0.6);
  --ao-head-bg: rgba(5, 6, 10, 0.86);
  --ao-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ao-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ao-wrap: 1216px;
  --ao-gutter: 32px;
}

.ao-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Pills */
.ao-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  font: 700 16px/1 var(--ao-sans); letter-spacing: 0; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.ao-btn-primary { background: linear-gradient(135deg, var(--ao-pill-a), var(--ao-pill-b)); color: var(--ao-on-pill); box-shadow: 0 6px 18px rgba(110, 139, 255, 0.28); }
.ao-btn-primary:hover { background: linear-gradient(135deg, var(--ao-pill-hover-a), var(--ao-pill-hover-b)); color: var(--ao-on-pill); box-shadow: 0 10px 26px rgba(110, 139, 255, 0.36); }
.ao-btn-primary:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(74, 54, 201, 0.3); }
.ao-btn-secondary { background: var(--ao-lav); color: var(--ao-on-lav); }
.ao-btn-secondary:hover { background: color-mix(in srgb, var(--ao-lav) 82%, var(--ao-brand)); }
.ao-btn-secondary:active { transform: scale(0.97); }
.ao-btn-ghost { background: transparent; color: var(--ao-accent); padding: 0 14px; }
.ao-btn-ghost:hover { background: var(--ao-raised); color: var(--ao-accent-hover); }
.ao-btn svg { width: 20px; height: 20px; flex: none; }
.ao-btn:focus-visible, .ao-seg a:focus-visible, .ao-logo:focus-visible, .ao-foot a:focus-visible {
  outline: 3px solid var(--ao-focus); outline-offset: 3px;
}

/* Header */
.ao-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--ao-head-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--ao-rule) 70%, transparent);
  font-family: var(--ao-sans);
}
.ao-head-in {
  width: min(var(--ao-wrap), calc(100% - 2 * var(--ao-gutter))); margin: 0 auto;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 72px;
}
.ao-logo { justify-self: start; display: inline-flex; border-radius: 12px; line-height: 0; }
.ao-logo img { display: block; height: 36px; width: auto; }
.ao-head-in > nav { justify-self: end; min-width: 0; }
.ao-seg { display: flex; gap: 4px; padding: 4px; margin: 0; border-radius: 999px; background: var(--ao-raised); list-style: none; }
.ao-seg a {
  display: block; padding: 8px 18px; border-radius: 999px; color: var(--ao-text-2); text-decoration: none;
  font: 600 15px/20px var(--ao-sans); white-space: nowrap; transition: background-color 0.2s ease, color 0.2s ease;
}
.ao-seg a:hover { color: var(--ao-text); background: color-mix(in srgb, var(--ao-surface) 60%, transparent); }
.ao-seg a[aria-current="page"] { background: var(--ao-surface); color: var(--ao-text); box-shadow: var(--ao-shadow-1); }
/* Discord lives in the nav row: the last segment, in the primary pill colours. */
.ao-seg .ao-discord { display: flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--ao-pill-a), var(--ao-pill-b)); color: var(--ao-on-pill); font-weight: 700; }
.ao-seg .ao-discord:hover { background: linear-gradient(135deg, var(--ao-pill-hover-a), var(--ao-pill-hover-b)); color: var(--ao-on-pill); }
.ao-seg .ao-discord svg { width: 18px; height: 18px; flex: none; }

/* Footer */
.ao-foot { margin-top: 64px; border-top: 1px solid var(--ao-rule); background: var(--ao-bg); color: var(--ao-text-2); font-family: var(--ao-sans); }
.ao-foot-in {
  width: min(var(--ao-wrap), calc(100% - 2 * var(--ao-gutter))); margin: 0 auto; padding: 36px 0 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start;
}
.ao-foot-brand { display: flex; align-items: center; gap: 14px; }
.ao-foot-brand img { width: 44px; height: 44px; display: block; flex: none; }
.ao-foot-brand p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ao-foot-name { font: 700 17px/22px var(--ao-sans); color: var(--ao-text); }
.ao-foot-tag { font: 500 15px/20px var(--ao-sans); color: var(--ao-text-2); }
.ao-foot-note { grid-column: 1 / -1; margin: 0; max-width: 46rem; font: 500 14px/21px var(--ao-sans); color: var(--ao-muted); }
.ao-foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 4px; }
.ao-foot nav a { padding: 6px 10px; border-radius: 999px; color: var(--ao-text-2); text-decoration: none; font: 600 14px/20px var(--ao-sans); }
.ao-foot nav a:hover { background: var(--ao-raised); color: var(--ao-text); }
.ao-foot .ao-sponsor { color: var(--ao-text-2); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.ao-foot .ao-sponsor:hover { color: var(--ao-text); }
.ao-foot-note a { color: var(--ao-text-2); text-underline-offset: 0.2em; }
.ao-foot-note a:hover { color: var(--ao-text); }

@media (max-width: 900px) {
  .ao-head-in { grid-template-columns: 1fr; row-gap: 0; padding-top: 12px; }
  .ao-head-in > nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; margin: 10px 0 12px; }
  .ao-seg { overflow-x: auto; scrollbar-width: none; }
  .ao-seg::-webkit-scrollbar { display: none; }
  .ao-seg li { flex: 1 0 auto; }
  .ao-seg a { text-align: center; }
  .ao-foot-in { grid-template-columns: 1fr; }
  .ao-foot nav { justify-content: flex-start; margin-left: -10px; }
}
@media (max-width: 520px) {
  :root { --ao-gutter: 20px; }
  .ao-logo img { height: 30px; }
  .ao-seg .ao-discord svg, .ao-discord-pre { display: none; }
  .ao-seg a { padding: 7px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ao-btn, .ao-seg a { transition: none; }
  .ao-btn:active { transform: none; }
}
@media print {
  .ao-head, .ao-foot { display: none !important; }
}

/* ---------- Mobile-native chrome (< 768px), Nov 11 ----------
   Desktop is untouched. Every control is at least 44 x 44 CSS px (WCAG 2.2 SC 2.5.5,
   Apple HIG 44pt minimum); header and footer clear the notch and the home indicator
   with env(safe-area-inset-*) (the pages declare viewport-fit=cover). */
@media (max-width: 767.98px) {
  .ao-head { padding-top: env(safe-area-inset-top); }
  .ao-head-in { width: auto; margin: 0 max(var(--ao-gutter), env(safe-area-inset-left)) 0 max(var(--ao-gutter), env(safe-area-inset-right)); padding-top: 8px; }
  .ao-logo { min-height: 44px; align-items: center; }
  .ao-head-in > nav { margin: 6px 0 10px; }
  .ao-seg { scroll-snap-type: x proximity; }
  .ao-seg a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; font-size: 15px; scroll-snap-align: start; }
  .ao-foot-in { width: auto; margin: 0 max(var(--ao-gutter), env(safe-area-inset-left)) 0 max(var(--ao-gutter), env(safe-area-inset-right)); padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
  .ao-foot nav { gap: 4px; }
  .ao-foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 15px; }
  .ao-foot-note { font-size: 16px; line-height: 24px; }
}

/* Footer, cut down: the mark and one small link to /site. */
.ao-foot-in { align-items: center; }
.ao-foot nav a.ao-foot-small { font: 500 13px/18px var(--ao-sans); color: var(--ao-muted); }
.ao-foot nav a.ao-foot-small:hover { color: var(--ao-text-2); background: none; text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 767.98px) {
  .ao-foot nav a.ao-foot-small { font-size: 14px; }
}

/* Text-only Log (Nov 20), mobile: the header scrolls away instead of pinning ~125px of a 390px
   phone screen. Desktop keeps the sticky bar. */
@media (max-width: 767.98px) {
  .ao-head { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ao-bg); }
  .ao-head-in > nav { margin: 4px 0 10px; }
}
