@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #1c1915;
  --cream: #f3eee4;
  --muted: #c4b8a6;
  --accent: #8eaa96;
  --rule: #3a342c;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  --measure: 40rem;
}

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

html {
  background: var(--bg);
  color: var(--cream);
  color-scheme: dark;
  scrollbar-color: var(--rule) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--cream);
  color: var(--bg);
  transform: translateY(-200%);
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.page {
  width: min(var(--measure), calc(100% - 3rem));
  margin-inline: auto;
  padding: 2.75rem 0 5.5rem;
  overflow-wrap: break-word;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 4.5rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-decoration: none;
}

.mark:visited {
  color: var(--cream);
}

a {
  color: var(--cream);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:visited {
  color: var(--cream);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

.skip:focus-visible {
  outline-color: var(--bg);
}

h1,
h2,
.mark,
.email {
  text-rendering: optimizeLegibility;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.65rem, 3.4vw + 1.7rem, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.lede {
  margin: 1.6rem 0 0;
  font-size: 1.35rem;
  line-height: 1.45;
  text-wrap: pretty;
}

section {
  margin-top: 4rem;
}

h2 {
  margin: 0 0 0.95rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1vw + 1.45rem, 2.15rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h2::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1px;
  margin-bottom: 0.9rem;
  background: var(--accent);
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: 1rem;
}

.patterns,
.links,
.featured {
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.patterns li + li {
  margin-top: 1.2rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.15rem;
}

.links a,
.site-footer a,
.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
}

.email {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 1.35rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.featured li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}

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

.site-footer {
  margin-top: 4.5rem;
}

@media (min-width: 800px) {
  .page {
    padding: 4rem 0 7rem;
  }

  .site-header {
    margin-bottom: 6.25rem;
  }

  section {
    margin-top: 5.5rem;
  }

  .site-footer {
    margin-top: 5.5rem;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #1c1915;
  }

  a,
  .mark,
  .mark:visited,
  a:visited {
    color: #1c1915;
    text-decoration-color: #1c1915;
  }

  h2::before {
    background: #1c1915;
  }

  .skip {
    display: none;
  }
}
