@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FCF9EF;
  --ink: #1A1A1A;
  --grey: #5F5F5F;
  --caption-grey: #616161;
  --green: #306F29;
  --white: #FFFFFF;
  --text: clamp(1.0625rem, 1.0375rem + 0.125vw, 1.15rem);
  --h1: clamp(1.75rem, 1.107rem + 3.214vw, 4rem);
  --h2: clamp(1.5rem, 1.214rem + 1.429vw, 2.5rem);
  --h3: clamp(1.375rem, 1.25rem + 0.625vw, 1.8125rem);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--grey);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 370;
  font-size: var(--text);
  line-height: 1.355;
  letter-spacing: -0.023em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, ul, ol, li, form, fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

button,
input {
  appearance: none;
  -webkit-appearance: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 370;
  font-size: var(--text);
  line-height: 1.355;
  letter-spacing: -0.023em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

a,
button {
  display: inline-block;
  color: var(--green);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

a:hover,
a:focus,
a:focus-visible,
a:active,
button:hover,
button:focus,
button:focus-visible,
button:active {
  color: var(--green);
  text-decoration: none;
}

a:hover,
a:focus-visible,
a:active,
button:hover,
button:focus-visible,
button:active {
  animation: pearl-shimmy 320ms ease 1;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

@keyframes pearl-shimmy {
  0% { transform: translateX(0); }
  35% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s;
    animation-iteration-count: 1;
    transition-duration: 0s;
  }
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.029em;
  text-wrap: pretty;
}

h1 {
  font-size: var(--h1);
  line-height: 1.1;
}

h2 {
  font-size: var(--h2);
  line-height: 1.1;
}

h3 {
  font-size: var(--h3);
  line-height: 1.25;
}

.hero img {
  width: 100%;
  height: auto;
  max-height: 30rem;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

@media (min-width: 900px) {
  .page {
    max-width: 42rem;
    padding: 64px 0 96px;
  }
}

.back {
  display: inline-block;
  margin: 0 0 24px;
}

.lead {
  margin-top: 24px;
}

.block {
  margin-top: 40px;
}

.block h2,
.block h3 {
  margin-bottom: 16px;
}

.block p + p,
.lead + p {
  margin-top: 16px;
}

.search {
  margin-top: 40px;
}

.search label {
  display: block;
  color: var(--grey);
  margin-bottom: 8px;
}

.search input {
  display: block;
  width: 100%;
  background: var(--white);
  color: var(--ink);
  padding: 8px 16px;
  caret-color: var(--ink);
}

.search input:focus,
.search input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 0;
}

.group {
  margin-top: 40px;
}

.group h2 {
  margin-bottom: 16px;
}

.goals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps li {
  padding-left: 24px;
  position: relative;
  color: var(--grey);
}

.steps li .n {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--grey);
}

.warning {
  margin-top: 40px;
  color: var(--ink);
}

.warning p {
  color: var(--ink);
}

.diagram-wrap {
  position: relative;
  margin-top: 24px;
}

.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-wrap .num {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: var(--green);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: var(--text);
  line-height: 1;
  letter-spacing: -0.023em;
  transform: translate(-50%, -50%);
}

.callouts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.callouts .n {
  color: var(--green);
}

.site-nav {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.empty {
  margin-top: 24px;
}

h1 + p,
h1 + .warning,
h1 + .block,
h1 + .steps {
  margin-top: 24px;
}

.warning + p,
.warning + .steps,
.warning + .block,
.steps + .diagram-wrap,
.diagram-wrap + .block,
.callouts + .block,
p + .block,
p + p {
  margin-top: 16px;
}

.warning + p,
.warning + .steps,
.warning + .block {
  margin-top: 24px;
}

.page > p:first-of-type {
  margin-top: 24px;
}

.callouts + .block,
.diagram-wrap + .callouts {
  /* callouts already have margin-top */
}

@media (min-width: 900px) {
  h1 + p,
  h1 + .warning,
  h1 + .block,
  h1 + .steps,
  .page > p:first-of-type {
    margin-top: 40px;
  }
}


.note {
  color: var(--caption-grey);
  font-size: var(--text);
  font-weight: 370;
  letter-spacing: -0.023em;
  line-height: 1.355;
}

p.note,
.note + .note,
p + .note,
.steps + .note,
.warning + .note,
.callouts + .note,
.diagram-wrap + .note,
.block .note,
.lead .note {
  margin-top: 16px;
}
