/*
 * The blog (D-113): /blog and /blog/{slug}, written by HeyCatch and rendered
 * by the edge function in netlify/edge-functions/blog.ts. The article itself
 * uses the guides' .doc styles; this adds the list, the table of contents and
 * the few elements the guides don't use.
 */

/* /blog: one line per article, title then date and read time. */
.blog-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.doc .blog-item {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.doc .blog-item-title {
  margin: 0 0 6px;
  font: 650 22px/1.3 var(--serif);
  letter-spacing: -0.008em;
}

.blog-item-title a {
  color: var(--ink);
  text-decoration: none;
}

.blog-item-title a:hover {
  color: var(--teal-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc .blog-item-meta,
.blog-empty {
  margin: 0;
  color: var(--ink-3);
  font-size: 15px;
}

.blog-empty {
  font-size: 17px;
}

/* "Blog" above an article's or a guide's title, back to the list. */
.doc-head .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.doc-head .eyebrow a:hover {
  text-decoration: underline;
}

/* The table of contents, after the Key takeaways. */
.blog-toc {
  margin: 28px 0 8px;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
}

.doc .blog-toc-title {
  margin: 0 0 10px;
  color: var(--teal-ink);
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-toc ol {
  margin: 0;
  padding-left: 1.25em;
}

.blog-toc li {
  margin: 6px 0;
}

.blog-toc a {
  color: var(--ink-2);
}

.blog-toc a:hover {
  color: var(--teal-ink);
}

/* What the guides don't use. */
.blog-article a {
  color: var(--teal-ink);
  text-underline-offset: 3px;
}

.blog-article blockquote {
  margin: 20px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--teal);
  color: var(--ink-2);
}

.blog-article blockquote > :last-child {
  margin-bottom: 0;
}

.blog-article code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper-sunk);
  font-size: 0.92em;
}

.blog-article pre {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--paper-sunk);
}

.blog-article pre code {
  padding: 0;
  background: none;
}

.blog-article hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.blog-article h4 {
  margin: 26px 0 6px;
  font: 600 16px/1.4 var(--sans);
}
