:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #d4cdc0;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --serif: "New York", "Iowan Old Style", Palatino, "Palatino Linotype", "Noto Serif Display", Georgia, "Liberation Serif", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141311;
    --ink: #f4f0e6;
    --muted: #b7b0a3;
    --line: #3a362f;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

main {
  width: min(40rem, 100%);
  margin-bottom: 6vh;
  text-align: center;
}

.mark {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 2.4vw + 1.7rem, 4.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
}

hr {
  width: 2.25rem;
  height: 1px;
  margin: 1.7rem auto 1.55rem;
  border: 0;
  background: var(--line);
}

.lede,
.note {
  margin-right: auto;
  margin-left: auto;
  max-width: 36rem;
}

.lede {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.15rem, 0.35vw + 1.05rem, 1.35rem);
  line-height: 1.45;
}

.note {
  margin-top: 1.15rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--ink);
}

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

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

@media (forced-colors: active) {
  :root {
    --bg: Canvas;
    --ink: CanvasText;
    --muted: CanvasText;
    --line: CanvasText;
  }

  a:focus-visible {
    outline-color: Highlight;
  }
}

@media (max-width: 380px) {
  body {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  h1 {
    font-size: clamp(1.6rem, 7.8vw, 2rem);
    letter-spacing: -0.025em;
  }

  .lede {
    font-size: 0.97rem;
  }

  .note {
    font-size: 0.95rem;
  }

  main {
    margin-bottom: 2vh;
  }
}
