:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --bg-shade: #e6e0d4;
  --ink: #1a1714;
  --muted: #3f3a34;
  --focus: #1a1714;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a17;
    --bg-shade: #12110f;
    --ink: #f6f3ec;
    --muted: #d5cbbd;
    --focus: #f6f3ec;
  }
}

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

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  gap: 1.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  box-shadow: inset 0 0 10rem 1rem var(--bg-shade);
}

.site-header,
.site-footer,
main {
  width: min(100%, 72rem);
  max-width: 100%;
}

.skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.3;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
  max-width: 100%;
}

.brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  max-width: 100%;
  font-weight: 600;
  line-height: 1.3;
  text-align: start;
}

.brand span {
  min-width: 0;
}

.mark {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: block;
}

.mark rect {
  fill: currentColor;
}

.mark circle {
  fill: var(--bg-shade);
}

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

.nav-list a,
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0.75rem;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-block: 1.5rem;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.lede {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.35rem);
  line-height: 1.5;
  text-wrap: balance;
}

.back {
  margin-top: 1.25rem;
}

.site-footer p {
  margin: 0;
  max-width: 100%;
  color: var(--muted);
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

a:focus,
main:focus {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.25rem;
}

[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 0.18em;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

@media (min-width: 48rem) {
  body {
    padding: 1.5rem;
    gap: 2rem;
  }

  main {
    padding-block: 2.5rem;
  }
}

@media (min-width: 64rem) {
  body {
    padding: 2rem;
  }
}

@media (min-width: 90rem) {
  body {
    padding: 2.5rem;
  }
}

@media (prefers-contrast: more) {
  body {
    background-color: var(--bg);
    box-shadow: none;
  }

  .lede,
  .site-footer p {
    color: var(--ink);
  }

  a {
    text-decoration-thickness: 0.16em;
  }

  a:focus,
  main:focus {
    outline-width: 0.25rem;
  }
}

@media (forced-colors: active) {
  body {
    background: Canvas;
    box-shadow: none;
    color: CanvasText;
  }

  a {
    color: LinkText;
  }

  .lede,
  .site-footer p {
    color: CanvasText;
  }

  a:focus,
  main:focus {
    outline: 0.1875rem solid Highlight;
    outline-offset: 0.25rem;
  }

  .mark rect {
    fill: CanvasText;
  }

  .mark circle {
    fill: Canvas;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
