/* Shared by every page: colours, fonts, the night sky (dither band and stars) and a few helpers.
   Page layout lives in each page's own <style> block. */
:root {
  color-scheme: dark;
  --sky: #131e3a;
  --sky-deep: #0c1230;
  --well: #0e1631;
  --surface: #1c284a;
  --surface-line: #2f3b5e;
  --cream: #e5cdb3;
  --cream-bright: #f1dfc8;
  --cream-dim: #cbbba6;
  --muted: #a99d90;
  --gold: #e7bf81;
  --ink: #131e3a;
  --font-pixel: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--sky); }

/* Dithered band of deeper navy along the top edge, as on the banner. */
.dither {
  position: fixed;
  inset: 0 0 auto 0;
  height: 54px;
  pointer-events: none;
  background:
    linear-gradient(var(--sky-deep), var(--sky-deep)) 0 0 / 100% 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%230c1230' d='M0 0h3v3H0zM3 3h3v3H3z'/%3E%3C/svg%3E") 0 12px / 6px 6px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%230c1230' d='M0 0h3v3H0zM3 3h3v3H3z'/%3E%3C/svg%3E") 0 18px / 6px 6px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%230c1230' d='M0 0h3v3H0zM3 3h3v3H3z'/%3E%3C/svg%3E") 0 24px / 6px 6px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%230c1230' d='M0 0h3v3H0zM6 6h3v3H6z'/%3E%3C/svg%3E") 0 30px / 12px 12px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%230c1230' d='M0 0h3v3H0zM6 6h3v3H6z'/%3E%3C/svg%3E") 0 42px / 12px 12px repeat-x;
}

/* Stars are drawn by assets/stars.js as box-shadows on these two layers. */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 3px;
  pointer-events: none;
}
.stars--twinkle { animation: twinkle 5s steps(1) infinite; }
@keyframes twinkle { 50% { opacity: 0.3; } }

:focus-visible {
  outline: 2px solid #fff6e6;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .stars--twinkle { animation: none; }
}
