/* Shared style of the long-form posts. The homepage uses style.css. */

:root {
  --ink: #1b1b1b;
  --ink-2: #4a4a4a;
  --ink-3: #767676;
  --rule: #e4e4e0;
  --paper: #ffffff;
  --tint: #f6f6f3;
  --link: #2f5d9e;
  --serif: "Source Serif 4", "Georgia", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  padding: 0 20px;
  -webkit-font-smoothing: antialiased;
}

.site {
  max-width: 780px;
  margin: 0 auto;
  padding-top: 28px;
  font-family: var(--sans);
  font-size: 13px;
}

.site a {
  color: var(--ink-3);
  text-decoration: none;
}

.site a:hover {
  color: var(--ink);
}

article {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 0 96px;
}

h1 {
  font-family: var(--sans);
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin: 0 0 12px;
}

.byline {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 16px;
}

h2 {
  font-family: var(--sans);
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 56px 0 12px;
}

p {
  margin: 0 0 18px;
}

ul {
  margin: 0 0 18px;
  padding-left: 24px;
}

li {
  margin: 0 0 4px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(47, 93, 158, 0.35);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--link);
}

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--tint);
  padding: 1px 5px;
  border-radius: 4px;
}

pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  background: var(--tint);
  border-radius: 6px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 0 0 22px;
}

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

figure {
  margin: 36px 0 36px;
}

figcaption {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: 10px;
}

.scroll {
  overflow-x: auto;
}

table.bench {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 640px;
}

table.bench th,
table.bench td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

table.bench thead th {
  font-weight: 600;
  color: var(--ink);
  vertical-align: bottom;
  border-bottom: 1px solid #c9c9c4;
}

table.bench tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  white-space: normal;
  min-width: 150px;
}

table.bench td.best {
  font-weight: 650;
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 31px;
  }

  h2 {
    font-size: 22px;
  }

  article {
    padding-top: 36px;
  }
}

table.bench thead th:first-child {
  text-align: left;
}
