:root {
  color-scheme: light;
  --notes-paper: #f7f5f0;
  --notes-card: #fffefa;
  --notes-ink: #1f2926;
  --notes-muted: #53635c;
  --notes-rule: #d4dcd3;
  --notes-accent: #176a52;
  --notes-focus: #a04216;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--notes-paper);
  color: var(--notes-ink);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--notes-paper);
  color: var(--notes-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--notes-accent);
  text-underline-offset: 0.2em;
}

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

.skip-link {
  position: absolute;
  inset-block-start: -5rem;
  inset-inline-start: 1rem;
  z-index: 2;
  padding: 0.7rem 1rem;
  background: var(--notes-ink);
  color: white;
}

.skip-link:focus {
  inset-block-start: 1rem;
}

.notes-header,
.notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 70rem) / 2));
  border-block-end: 1px solid var(--notes-rule);
}

.notes-header nav,
.notes-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.notes-header nav a,
.notes-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.notes-brand {
  color: var(--notes-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.notes-main,
.article-main {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 8vw, 7rem);
}

.notes-main h1,
.article-main h1 {
  max-width: 18ch;
  margin-block: 0.3rem 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.notes-kicker {
  color: var(--notes-accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.notes-intro,
.article-lede {
  max-width: 58ch;
  color: var(--notes-muted);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin-block-start: 3rem;
}

.notes-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 15rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--notes-rule);
  background: var(--notes-card);
}

.notes-card time,
.notes-card__tags {
  color: var(--notes-muted);
  font-size: 0.85rem;
}

.notes-card h2 {
  margin-block: 0.85rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1.2;
}

.notes-card h2 a {
  color: var(--notes-ink);
  text-decoration-color: transparent;
}

.notes-card h2 a:hover {
  color: var(--notes-accent);
  text-decoration-color: currentColor;
}

.notes-card p {
  max-width: 55ch;
  margin-block: 0 1rem;
}

.notes-card__read {
  margin-block-start: auto;
  font-weight: 700;
}

.article-main {
  max-width: 54rem;
}

.article-main article {
  padding: clamp(1.25rem, 5vw, 3.5rem);
  border: 1px solid var(--notes-rule);
  background: var(--notes-card);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2.5rem;
  padding: 0;
  list-style: none;
}

.article-tags li {
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--notes-rule);
  border-radius: 999px;
  color: var(--notes-muted);
  font-size: 0.8rem;
}

.prose {
  max-width: 68ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.prose h2 {
  margin-block: 2.5rem 0.65rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
}

.prose p,
.prose ol,
.prose ul {
  margin-block: 0.85rem 1.25rem;
}

.prose li + li {
  margin-block-start: 0.45rem;
}

.prose code {
  padding: 0.1rem 0.3rem;
  background: #e9eee8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em;
}

.article-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.notes-footer {
  border-block: 1px solid var(--notes-rule);
  border-inline: 0;
  color: var(--notes-muted);
}

@media (max-width: 36rem) {
  .notes-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .notes-main,
  .article-main {
    width: min(100% - 1.5rem, 70rem);
  }

  .article-main article {
    padding: 1.1rem;
  }

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