/* Reset, page background and default element styles. */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-title); font-weight: 400; color: var(--text-strong); }
p { margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; }

code, pre { font-family: var(--font-mono); }
code { font-size: 0.9em; color: var(--accent-soft); }
pre {
  margin: 0;
  padding: 16px 18px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
pre code { color: inherit; font-size: inherit; }

mark { background: var(--accent-wash); color: var(--text-strong); padding: 0 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Reduced motion: stop transitions and most animations. The terminal cursor and
   the hero network keep a calm version on purpose (see layout.css and pages.css). */
@media (prefers-reduced-motion: reduce) {
  *:not(.hero__cursor, .hero__net *), *::before, *::after { animation: none !important; transition: none !important; }
}

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--accent); color: var(--bg); font: 500 13px/1 var(--font-mono); }
.skip-link:focus { top: 8px; }
