@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --paper: #ffffff;
  --paper-tint: #eef4ef;
  --ink: #142019;
  --ink-soft: #4a5a51;
  --ink-mute: #65726a;
  --green: #1e5a43;
  --green-deep: #153f30;
  --brass: #b07d28;
  --brass-soft: #f4ecd9;
  --rule: #d3ddd6;
  --rule-strong: #b4c3ba;

  --font: 'Onest Variable', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  --content: 74rem;
  --radius-s: 6px;
  --radius-m: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--green-deep);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Masthead and footer, shared with the homepage */

.masthead,
.footer {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.wordmark-mark {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--green);
}

.masthead-nav {
  display: flex;
  gap: 1.5rem;
}

.masthead-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.masthead-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: clamp(3rem, 8vw, 6rem);
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Reserved advertising placements. Fixed height so a network filling one later
   moves nothing; labelled so it is never mistaken for content. */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 250px;
  margin: 2.5rem 0;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-s);
  background: transparent;
  contain: layout;
}

.article-body .ad-slot {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.ad-slot-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

/* Static pages: About, Privacy, Terms */

.page {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin-inline: auto;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.024em;
  font-weight: 560;
  text-wrap: balance;
}

.page-dek {
  margin: 0.9rem 0 0;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.page-meta {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-mute);
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.6;
}

.page-body > * {
  margin: 0;
}

.page-body > * + * {
  margin-top: 1em;
}

.page-body h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.016em;
  font-weight: 560;
  margin-top: 2.2em;
}

.page-body p,
.page-body ul,
.page-body ol {
  max-width: var(--measure);
}

.page-body ul,
.page-body ol {
  padding-left: 1.4em;
}

.page-body li + li {
  margin-top: 0.4em;
}

.page-body li::marker {
  color: var(--green);
}

.page-body code {
  font-family: inherit;
  font-size: 0.94em;
  background: var(--paper-tint);
  border-radius: 3px;
  padding: 0.08em 0.4em;
  color: var(--green-deep);
}

/* Article */

.article {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin-inline: auto;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.article-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.article-topic {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--green);
  font-weight: 520;
}

.article-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.026em;
  font-weight: 560;
  text-wrap: balance;
}

.article-dek {
  margin: 1.1rem 0 0;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.article-meta {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-mute);
}

.article-figure {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-m);
}

.article-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

/* Body copy */

.article-body {
  font-size: 1.1rem;
  line-height: 1.62;
}

.article-body > * {
  margin: 0;
}

.article-body > * + * {
  margin-top: 1.1em;
}

.article-body h2 {
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 560;
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
}

.article-body h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 560;
  margin-top: 1.8em;
}

.article-body p {
  max-width: var(--measure);
}

.article-body strong {
  font-weight: 600;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
  max-width: var(--measure);
}

.article-body li + li {
  margin-top: 0.45em;
}

.article-body li::marker {
  color: var(--green);
}

.article-body code {
  font-family: inherit;
  font-size: 0.94em;
  background: var(--paper-tint);
  border-radius: 3px;
  padding: 0.08em 0.4em;
  color: var(--green-deep);
}

.article-body pre {
  overflow-x: auto;
  background: var(--paper-tint);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-s);
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--green-deep);
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article-body blockquote {
  margin-left: 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--green);
  color: var(--ink-soft);
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.article-body th,
.article-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.article-body th[align='right'],
.article-body td[align='right'] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-right: 0.9rem;
}

.article-body th[align='center'],
.article-body td[align='center'] {
  text-align: center;
}

.article-body thead th {
  font-weight: 520;
  color: var(--ink-soft);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--rule-strong);
}

.article-body tbody th {
  font-weight: 560;
}

/* Sources and the next step */

.article-sources {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.25rem 1.5rem;
  background: var(--paper-tint);
  border-radius: var(--radius-m);
}

.article-sources h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.article-sources p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.article-next {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.article-next p {
  margin: 0;
  font-weight: 520;
}

.button {
  font: inherit;
  font-size: 1rem;
  font-weight: 560;
  color: var(--paper);
  background: var(--green);
  border: 0;
  border-radius: var(--radius-s);
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background: var(--green-deep);
  color: var(--paper);
}

@media (max-width: 560px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .masthead-nav {
    gap: 1.1rem;
  }

  .article-body {
    font-size: 1.05rem;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
