/* Shared by every page: tokens, reset, header, buttons, footer. A dark gate room; the consoles below read like the SGC's. */
:root {
  color-scheme: dark;
  --void: #04060c;          /* page */
  --hull: #0a1020;          /* panels */
  --hull-2: #0f1830;        /* raised panels */
  --line: rgba(122, 162, 230, 0.16);
  --line-strong: rgba(122, 162, 230, 0.32);
  --text: #e4ecf9;
  --muted: #8a99b8;
  --dim: #7886a6;           /* >= 4.5:1 on --void */
  --horizon: #56c8ff;       /* event horizon */
  --horizon-deep: #1d63ff;
  --chevron: #ff8a2b;       /* locked chevron */
  --chevron-soft: rgba(255, 138, 43, 0.14);
  --ok: #3ddc97;
  --idle: #f5c451;
  --off: #ff5a6e;
  --f-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
/* the sticky header must not cover anchor targets or focused elements */
html { scroll-behavior: smooth; scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(4, 6, 12, 0.85);
}
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
a { color: var(--horizon); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* links inside running text: colour alone is not enough (WCAG 1.4.1) */
p a, li a, address a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(86, 200, 255, 0.5); }
p a:hover, li a:hover, address a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--horizon); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--hull-2); color: var(--text); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line-strong); }
.skip:focus { top: 12px; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--horizon);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: linear-gradient(to bottom, rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.7));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--f-display); font-weight: 700; letter-spacing: 0.14em; font-size: 15px; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  font: 600 13px/1 var(--f-body); color: var(--muted); border: 1px solid transparent;
  padding: 9px 12px; border-radius: 999px; transition: color .2s, border-color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); border-color: var(--line); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(86, 200, 255, 0.08); border-color: rgba(86, 200, 255, 0.35); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 700 14px/1 var(--f-body); letter-spacing: 0.02em;
  padding: 14px 20px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.02);
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: rgba(86, 200, 255, 0.55); }
.btn.primary { background: linear-gradient(135deg, #2a7bff, #56c8ff); border-color: transparent; color: #031026; box-shadow: 0 10px 40px -12px rgba(86, 200, 255, 0.7); }
.btn.primary:hover { box-shadow: 0 16px 50px -12px rgba(86, 200, 255, 0.9); }
.btn svg { width: 16px; height: 16px; }
.back { font: 600 13px/1 var(--f-mono); color: var(--muted); justify-self: start; letter-spacing: .06em; text-transform: uppercase; }
.back:hover { color: var(--text); text-decoration: none; }

/* ------------------------------------------------------------------ footer */
footer { border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
footer .wrap { padding-block: 32px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
footer p { max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: start; }
.foot-links a { font: 600 13px/1.4 var(--f-body); color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .nav-links a.opt { display: none; }
}
@media (max-width: 560px) {
  .nav .wrap { gap: 8px; }
  .brand { white-space: nowrap; font-size: 13px; letter-spacing: .1em; gap: 8px; }
  .nav-links { flex-wrap: nowrap; gap: 2px; }
  .nav-links a { padding: 8px; }
}
@media (max-width: 359px) {
  .brand { font-size: 12px; letter-spacing: .06em; }
  .nav-links a { padding: 8px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
