/* Deflation Ratchet NeoCities starter stylesheet
   Deliberately simple: readable, fast, responsive, and friendly to text extraction. */

:root {
  --page-width: 72rem;
  --text-width: 48rem;
  --space: 1.25rem;
  --border: #c8c8c8;
  --muted: #555;
  --link: #174ea6;
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --text: #1e1e1e;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  line-height: 1.6;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--link);
}

a:hover,
a:focus {
  text-decoration-thickness: 0.14em;
}

.wrap {
  width: min(calc(100% - 2rem), var(--page-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 2px solid currentColor;
  z-index: 10;
}

.site-header {
  padding: 2rem 0 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-title {
  color: var(--text);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
}

.site-tagline {
  max-width: var(--text-width);
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-top: 3px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus,
.nav-list a[aria-current="page"] {
  border-top-color: currentColor;
  background: var(--bg);
}

.content {
  max-width: var(--text-width);
  margin-left: max(1rem, calc((100% - min(calc(100% - 2rem), var(--page-width))) / 2));
  padding-block: 3rem 4rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h2 {
  margin-top: 2.5rem;
}

.lede {
  font-size: 1.2rem;
}

li + li {
  margin-top: 0.45rem;
}

dt {
  margin-top: 1.2rem;
  font-weight: 700;
}

dd {
  margin-left: 0;
}

.button-link {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border: 1px solid currentColor;
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.95rem;
}

.site-footer p {
  max-width: var(--text-width);
}

@media (max-width: 42rem) {
  html {
    font-size: 17px;
  }

  .site-header {
    padding-top: 1.3rem;
  }

  .nav-list {
    display: block;
  }

  .nav-list a {
    border-top: 1px solid var(--border);
  }

  .nav-list a[aria-current="page"] {
    border-left: 4px solid currentColor;
  }

  .content {
    margin-inline: auto;
    padding-top: 2rem;
  }
}

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