:root {
  --paper: #f7f6f3;
  --ink: #002868;
  --muted: rgba(0, 40, 104, 0.68);
  --rule: rgba(0, 40, 104, 0.28);
  --measure: 65ch;
  --display: "DM Serif Display", Palatino, "Palatino Linotype", Georgia, serif;
  --serif: "Source Serif 4", Palatino, "Palatino Linotype", Georgia, serif;
}

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

html {
  background: var(--paper);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}

::selection {
  background: rgba(0, 40, 104, 0.14);
}

a {
  color: inherit;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
}

.nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 1.2rem;
  height: auto;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: baseline;
  gap: 1.35rem;
}

.nav-links a {
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

main {
  flex: 1;
  width: min(var(--measure), calc(100% - 3rem));
  margin: 0 auto;
  padding: 3.5rem 0 4.5rem;
}

.home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.home-mark {
  display: block;
  width: 4.25rem;
  height: auto;
  margin: 0 0 1.75rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 1rem;
}

h1 {
  margin: 0 0 1.15rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.15rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 em {
  font-style: italic;
}

.lede,
.page p,
.essay-body p {
  margin: 0;
}

.continue {
  margin: 1.75rem 0 0;
}

.continue a,
.page a {
  text-underline-offset: 0.18em;
}

.principles-label {
  margin: 2.75rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.principles {
  margin: 1.25rem 0 0;
  padding: 0;
}

.principle {
  margin: 0;
  padding: 1.35rem 0 0;
}

.principle h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.25;
}

.principle p {
  margin: 0;
}

.deck {
  margin: 0 0 1.75rem;
  font-style: italic;
}

.epigraph {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.35;
}

.epigraph p {
  margin: 0;
}

.signature {
  margin: 3rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  line-height: 1.45;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.35rem 1.5rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-underline-offset: 0.18em;
}

@media (max-width: 760px) {
  .nav {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.35rem 0 0.45rem;
  }

  .nav.nav-open .nav-links {
    display: flex;
  }

  main {
    width: min(var(--measure), calc(100% - 2rem));
    padding: 2.25rem 0 3rem;
  }

  .home {
    justify-content: flex-start;
  }
}

@media (max-height: 740px) {
  .home {
    justify-content: flex-start;
  }
}
