@font-face {
  font-family: 'Outfit Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/blog/fonts/outfit-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/blog/fonts/figtree-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/blog/fonts/instrument-serif-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/blog/fonts/instrument-serif-latin-400-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/blog/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
}

:root {
  color-scheme: light;
  --paper: #f5f2e6;
  --paper-2: #ece8d8;
  --ink: #12140e;
  --ink-2: #3d4034;
  --line: rgba(18, 20, 14, 0.14);
  --leaf: #4f6b2a;
  --lime: #c9d95a;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Figtree Variable', 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}
main {
  flex: 1;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ink);
}
a:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 16px gutter on phones, the reading column is capped at 68ch. */
.wrap {
  width: 100%;
  max-width: calc(68ch + 2rem);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}
/* Same lockup as the app (client/components/wordmark.css): "grow" then a capital-height X. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Outfit Variable', var(--sans);
  font-size: calc(22px / 0.7);
  font-size-adjust: cap-height 0.7;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img {
  display: block;
  width: auto;
  height: 1cap;
  margin-left: 0.03em;
}
.site-header nav a {
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.5rem 0;
}
.site-header nav a:hover {
  color: var(--leaf);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.75rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  margin: 0 0 1rem;
}

.meta {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.meta a {
  color: inherit;
}
.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.5rem;
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
}
.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.post__head {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.crumbs {
  margin-bottom: 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li + li::before {
  content: '/';
  margin-right: 0.5rem;
  opacity: 0.6;
}
.crumbs a {
  color: inherit;
}
.crumbs [aria-current='page'] {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero {
  margin: 1.75rem 0 0;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(18, 20, 14, 0.06), 0 8px 24px -12px rgba(18, 20, 14, 0.25);
}

.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  font-size: clamp(1.875rem, 5vw, 2.375rem);
  margin: 2.75rem 0 0.75rem;
}
.prose h3 {
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  margin: 2rem 0 0.5rem;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table,
.prose figure {
  margin: 0 0 1.25rem;
}
.prose ul,
.prose ol {
  padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.375rem;
}
.prose li::marker {
  color: var(--leaf);
}
.prose blockquote {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--lime);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.4;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--paper-2);
  padding: 0.125em 0.35em;
  border-radius: 4px;
}
.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
}
.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
}
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* Figures: screenshots and diagrams get a hairline border and a soft shadow; the caption is small mono. */
.prose figure {
  margin: 2rem 0;
}
.prose figure img {
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(18, 20, 14, 0.06), 0 8px 24px -12px rgba(18, 20, 14, 0.25);
}
.prose figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  opacity: 0.85;
  text-align: center;
}
/* Key takeaways: a lime-tinted box so the summary stands out on a skim. */
.takeaways {
  margin: 0 0 1.75rem;
  padding: 1.25rem 1.25rem 0.5rem;
  background: rgba(201, 217, 90, 0.28);
  border: 1px solid rgba(79, 107, 42, 0.35);
  border-radius: 12px;
}
.prose .takeaways h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
}
.prose .takeaways ul,
.prose .takeaways ol {
  margin-bottom: 0.75rem;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.index .lede {
  margin-bottom: 2.5rem;
}
.posts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.posts li {
  border-bottom: 1px solid var(--line);
}
.posts__link {
  display: block;
  padding: 1.75rem 0;
  color: inherit;
  text-decoration: none;
}
.posts__link h2 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  margin: 0 0 0.5rem;
}
.posts__link p {
  margin: 0;
}
.posts__link .meta {
  margin-bottom: 0.5rem;
}
.posts__link p:not(.meta) {
  color: var(--ink-2);
}
.posts__link:hover h2 {
  color: var(--leaf);
}
.empty {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--ink-2);
  margin: 0;
}
