/* Base of every page: reset, page, focus, the hidden text class and the plain button. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--black);
  color: var(--cream);
  font: 15px/1.45 var(--font-ui);
  overflow-x: hidden;
}
a { color: inherit; }
/* images can't be dragged out of the page (the templates also set draggable="false") */
img { max-width: 100%; -webkit-user-drag: none; user-select: none; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* a plain red button, used for links like "Source code" */
.btn {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  background: var(--red-deep); color: var(--cream);
  font: 14px/1.4 var(--font-mono); text-decoration: none; white-space: nowrap;
}
.btn:hover, .btn:focus-visible { background: var(--red); color: var(--black); }
/* an icon before the text, like the code host on "Source code" */
.btn .ico { width: 14px; height: 14px; margin: 0 6px 0 0; vertical-align: -2px; }
/* the main action of a group, like "visit the website" */
.btn.primary { background: var(--red); color: var(--black); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--red-hi); }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
