:root {
  font-size: clamp(1rem, 0.85rem + 0.8vw, 1.25rem);
  --bg: #F4F7F5;
  --fg: #13201B;
  --fg-muted: #52665E;
  --accent: #059669;
  --accent-hover: #047857;
  --border: #E2E8E4;
  --overlay-opacity: 0.10;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1715;
    --fg: #E2E8F0;
    --fg-muted: #64748B;
    --accent: #22C55E;
    --accent-hover: #4ADE80;
    --border: #1E2927;
    --overlay-opacity: 0.10;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 400;
  line-height: 1.4;
  min-height: 100dvh;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#overlay {
  position: fixed;
  width: 100vw;
  height: 100vh;
  left: 0;
  top: 0;
  opacity: var(--overlay-opacity);
  pointer-events: none;
  z-index: 100;
  background-image: radial-gradient(var(--accent) 1.25px, transparent 1.25px);
  background-size: 24px 24px;
}

#wrapper {
  margin: 3.5rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  row-gap: 0.95rem;
  max-width: 850px;
}

#wrapper > * {
  white-space: nowrap;
}

span,
p,
h2,
h1,
a {
  display: inline-block;
  font-family: inherit;
  font-weight: inherit;
}

h1 {
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}

p {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
  font-weight: 400;
  color: var(--fg);
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: color 0.15s ease, opacity 0.15s ease;
  padding: 0.1rem 0;
}

a span {
  position: relative;
}

a span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1.5px;
  background-color: var(--accent);
  left: 0;
  bottom: -0.15ch;
  transition: background-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  opacity: 0.85;
}

a:hover span::after {
  background-color: var(--accent-hover);
}

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

.noscript-fallback {
  padding: 3rem 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

.noscript-fallback h1 {
  font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.noscript-fallback h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--fg-muted);
}

.noscript-fallback ul {
  list-style: square;
  padding-left: 2ch;
}

.noscript-fallback li {
  margin-bottom: 0.4rem;
}

@media (max-width: 52rem) {
  #wrapper {
    margin: 2rem auto;
    padding: 0 1.25rem;
    row-gap: 0.75rem;
  }

  #wrapper > * {
    white-space: normal;
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  span {
    opacity: 1 !important;
  }
}