:root {
  --ink: #17324d;
  --ink-deep: #10263d;
  --ink-soft: #425466;
  --muted: #71808a;
  --teal: #2f7775;
  --teal-soft: #e5f0ed;
  --coral: #d87455;
  --coral-dark: #b85d43;
  --paper: #f7f3ec;
  --surface: #fffdf8;
  --line: #d9dfdc;
  --shadow: 0 18px 45px rgba(23, 50, 77, 0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper) !important;
  color: var(--ink-soft);
}

::selection {
  background: var(--coral);
  color: #fffdf8;
}

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

/* Navigation and headers ---------------------------------------------------- */

body > header > div.bg-navy {
  background: var(--ink) !important;
  border-bottom: 1px solid rgba(255, 253, 248, 0.14);
}

body.is-home > header > div.bg-navy,
body.is-section > header > div.bg-navy {
  background:
    radial-gradient(circle at 84% 18%, rgba(216, 116, 85, 0.34), transparent 29%),
    linear-gradient(120deg, var(--ink-deep) 0%, #1d4b57 58%, var(--teal) 100%) !important;
  border-bottom: 4px solid var(--coral);
}

body > header nav {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

body > header nav > div {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

body > header nav > div > a:first-child {
  align-items: center;
  color: var(--surface) !important;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body > header nav > div > a:first-child::before {
  background: var(--coral);
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 0.48rem;
  margin-right: 0.65rem;
  width: 0.48rem;
}

body > header nav ul a {
  position: relative;
  transition: color 160ms ease;
}

body > header nav ul a::after {
  background: var(--coral);
  bottom: -0.45rem;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
  width: 100%;
}

body > header nav ul a:hover::after,
body > header nav ul a:focus-visible::after {
  transform: scaleX(1);
}

body.is-home > header > div.bg-navy.pb6-l,
body.is-section > header > div.bg-navy.pb6-l {
  padding-bottom: 2.75rem !important;
}

body.is-home > header > div.bg-navy .tc-l,
body.is-section > header > div.bg-navy .tc-l {
  padding-bottom: 3rem !important;
  padding-top: 2.5rem !important;
}

body.is-home > header h1,
body.is-section > header h1 {
  color: var(--surface) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(2.75rem, 7vw, 4.5rem) !important;
  font-weight: 400 !important;
  letter-spacing: -0.045em;
  line-height: 0.98 !important;
}

body.is-home main > article {
  padding-bottom: 1rem !important;
  padding-top: 1.25rem !important;
}

body.is-section main > article > section:first-child {
  padding-bottom: 1rem !important;
  padding-top: 1rem !important;
}

body.is-section main > article > section.flex-ns {
  margin-top: 2rem !important;
}

/* Reading surfaces ---------------------------------------------------------- */

body.is-page main > article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem !important;
  margin-top: 2rem !important;
  padding-bottom: 2.5rem !important;
  padding-top: 2.25rem !important;
}

.nested-copy-line-height {
  color: var(--ink-soft) !important;
  line-height: 1.72;
}

.nested-copy-line-height p {
  margin-bottom: 1.25rem;
}

.nested-copy-line-height h2,
.nested-copy-line-height h3 {
  color: var(--ink) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.nested-copy-line-height h2 {
  font-size: 1.7rem;
  margin-top: 2.5rem;
}

.nested-copy-line-height h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
}

.nested-copy-line-height a:not(.ba):not(.button) {
  color: var(--teal);
  text-decoration-color: rgba(47, 119, 117, 0.45);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.nested-copy-line-height a:not(.ba):not(.button):hover {
  color: var(--coral-dark);
  text-decoration-color: var(--coral);
}

.nested-copy-line-height blockquote {
  background: #f1e9e1;
  border-left: 3px solid var(--coral);
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  margin-left: 0;
  padding: 1rem 1.25rem;
}

.nested-copy-line-height code {
  background: var(--teal-soft);
  border-radius: 0.3rem;
  color: var(--ink);
  padding: 0.12em 0.35em;
}

.nested-copy-line-height pre {
  background: var(--ink) !important;
  border-radius: 0.8rem;
  color: #f5f1e9 !important;
  overflow-x: auto;
  padding: 1.25rem;
}

.nested-copy-line-height pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Post cards ---------------------------------------------------------------- */

body.is-home main .relative,
body.is-section main article > section.flex-ns > div {
  background: var(--surface) !important;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

body.is-home main .relative:hover,
body.is-section main article > section.flex-ns > div:hover {
  box-shadow: 0 18px 38px rgba(23, 50, 77, 0.11);
  transform: translateY(-2px);
}

body.is-home main .relative > article > div {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

body.is-home main .relative > .bg-white,
body.is-section main article > section.flex-ns > div > .bg-white {
  background: transparent !important;
  margin-bottom: 0 !important;
}

body.is-home main .relative > .bg-white > .bg-white,
body.is-section main article > section.flex-ns > div > .bg-white > .bg-white {
  background: transparent !important;
  padding: 1.5rem !important;
}

body.is-home main h1,
body.is-section main h1 {
  color: var(--ink) !important;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

body.is-home main h1 a,
body.is-section main h1 a {
  color: var(--ink) !important;
  text-decoration: none;
}

body.is-home main h1 a:hover,
body.is-section main h1 a:hover {
  color: var(--coral-dark) !important;
}

body.is-home main time,
body.is-section main time,
body.is-home main h1 + time,
body.is-section main h1 + time {
  color: var(--muted) !important;
}

body a.ba.b--moon-gray {
  background: var(--coral) !important;
  border-color: var(--coral) !important;
  border-radius: 999px !important;
  color: #fffdf8 !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.65rem 1rem !important;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body a.ba.b--moon-gray:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  transform: translateY(-1px);
}

body.is-page .nested-copy-line-height > ul.pa0 a {
  background: var(--teal-soft) !important;
  border-color: transparent !important;
  color: var(--teal) !important;
  transition: background 160ms ease, color 160ms ease;
}

body.is-page .nested-copy-line-height > ul.pa0 a:hover {
  background: var(--coral) !important;
  color: #fffdf8 !important;
}

/* Footer -------------------------------------------------------------------- */

footer.bg-navy {
  background: var(--ink-deep) !important;
  border-top: 1px solid rgba(255, 253, 248, 0.12);
}

footer a {
  color: #d9e5e1 !important;
}

footer a:hover {
  color: var(--coral) !important;
}

/* Small screens ------------------------------------------------------------- */

@media screen and (max-width: 48em) {
  body > header nav > div {
    align-items: flex-start;
  }

  body > header nav > div > a:first-child {
    margin-bottom: 0.75rem;
  }

  body > header nav ul {
    margin-top: 0.5rem;
  }

  body.is-home > header > div.bg-navy.pb6-l,
  body.is-section > header > div.bg-navy.pb6-l {
    padding-bottom: 1rem !important;
  }

  body.is-home > header > div.bg-navy .tc-l,
  body.is-section > header > div.bg-navy .tc-l {
    padding-bottom: 2rem !important;
    padding-top: 1.75rem !important;
  }

  body.is-page main > article {
    border-radius: 0.85rem;
    padding-bottom: 1.75rem !important;
    padding-top: 1.5rem !important;
  }

  .nested-copy-line-height {
    line-height: 1.65;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
