:root {
  --fg: #111;
  --muted: #6b6b6b;
  --bg: #fff;
  --rule: #e6e6e6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #ececec;
    --muted: #8f8f8f;
    --bg: #0c0c0c;
    --rule: #262626;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  max-width: 34rem;
  margin: 0;
  padding: 18vh 1.5rem 3rem;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 40rem) {
  body {
    padding-left: 12vw;
  }
}

h1,
.brand {
  margin: 0 0 2rem;
  font: 600 1rem/1.6 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.04em;
}

.brand a {
  text-decoration: none;
}

/* the page's name reads as body text, the brand line above carries the h1 look */
h1.page-title {
  margin: 0 0 1rem;
  font: inherit;
  letter-spacing: normal;
}

h2 {
  margin: 2.5rem 0 0.5rem;
  font: 600 0.875rem/1.6 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.04em;
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

li {
  padding: 0.125rem 0;
}

li::before {
  content: "\2192\00a0\00a0";
  color: var(--muted);
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
}

/* opencode-style dot halo, kept in empty space: dots behind text make the glyphs shimmer */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: calc(18vh - 1rem);
  background: radial-gradient(ellipse 70% 100% at 15% 0%, color-mix(in srgb, var(--fg) 28%, transparent), transparent);
  /* a file, not a data: URI: the CSP's img-src covers masks */
  -webkit-mask: url("/dots.svg") 0 0 / 6px 6px repeat;
  mask: url("/dots.svg") 0 0 / 6px 6px repeat;
  pointer-events: none;
  animation: halo-in 1.2s ease-out;
}

/* wide enough for the halo to live right of the text column */
@media (min-width: 60rem) {
  body::before {
    left: calc(12vw + 34rem + 3rem);
    height: min(40rem, 85vh);
    background: radial-gradient(ellipse 100% 100% at 100% 0%, color-mix(in srgb, var(--fg) 28%, transparent), transparent);
  }
}

@keyframes halo-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}
