*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Serif', Georgia, serif;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.32;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 9997;
}
img { max-width: 100%; display: block; }
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { color: #ede8dc; }
p { margin-bottom: calc(var(--spacing) * 6); }
ul, ol { margin: 0 0 calc(var(--spacing) * 6) calc(var(--spacing) * 6); }
li { margin-bottom: calc(var(--spacing) * 2); }
code {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9em;
  color: var(--primary);
  background: var(--bg-card);
  padding: 1px 5px;
  border: 1px solid var(--border);
}
strong { color: #ede8dc; }
em { color: #ede8dc; }
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: calc(var(--spacing) * 10) 0;
}
::selection { background: var(--primary-dim); color: var(--primary); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hard); }
