/* Long-form styles for /blog. Header, footer, type, and the download button
   come from brand/brand.css so the blog stays on the same chrome as /brand/. */

.blog-main ::selection {
  background: rgb(185 10 74 / 16%);
}

.blog-index,
.post {
  padding-top: 0.5rem;
}

.blog-index h1,
.post h1 {
  max-width: 18ch;
  font-size: clamp(2.4rem, 1.35rem + 2.8vw, 3.5rem);
  text-wrap: balance;
}

.deck {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  color: var(--graphite);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  text-wrap: pretty;
}

.feed-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--graphite);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.post-list {
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
}

.post-list li + li {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(20 24 24 / 8%);
}

.post-list time {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--graphite);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.post-list h2 {
  max-width: 28ch;
  margin: 0;
  font-size: clamp(1.5rem, 1.15rem + 1vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.post-list p {
  max-width: 62ch;
  margin: 0.65rem 0 0;
  color: var(--graphite);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
}

.crumbs {
  margin: 0 0 0.95rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.crumbs a {
  color: var(--graphite);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 1.05rem 0 0;
  color: var(--graphite);
  font-size: 0.9375rem;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgb(20 24 24 / 5%);
  color: var(--graphite);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.prose {
  margin-top: 2.15rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.011em;
  overflow-wrap: break-word;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > h2,
.prose > h3,
.prose > hr,
.prose > blockquote,
.prose > pre {
  max-width: 68ch;
}

.prose h2,
.prose h3 {
  font-weight: 400;
  text-wrap: balance;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.6rem, 1.25rem + 0.9vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.prose h3 {
  margin: 1.85rem 0 0.45rem;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose hr {
  margin: 0 0 1.05rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}

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

.prose strong {
  font-weight: 600;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgb(20 24 24 / 6%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 500;
}

.prose pre {
  max-width: 100%;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 0.75rem;
  background: var(--ink);
  color: var(--cloud);
  font-size: 0.9rem;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 400;
}

.prose blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--crimson);
  color: var(--graphite);
}

.prose hr {
  border: 0;
  border-top: 1px solid rgb(20 24 24 / 12%);
}

.prose img {
  height: auto;
  margin: 1.25rem 0;
  border-radius: 0.75rem;
}

.table-wrap {
  max-width: min(52rem, 100%);
  margin: 0 0 1.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid rgb(20 24 24 / 12%);
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom-color: rgb(20 24 24 / 40%);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.prose td:first-child {
  font-weight: 500;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.download-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 68ch;
  margin-top: 2.5rem;
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  border: 1px solid rgb(20 24 24 / 10%);
  border-radius: 1.25rem;
  background: var(--white);
}

.download-cta h2 {
  margin: 0 0 0.3rem;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.download-cta p {
  margin: 0;
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.download-cta .cta {
  flex: none;
}

@media (max-width: 639px) {
  .download-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (hover: hover) and (pointer: fine) {
  .post-list h2 a:hover,
  .crumbs a:hover,
  .feed-link:hover,
  .prose a:hover {
    color: var(--crimson);
  }

  .prose a:hover {
    color: var(--crimson-dark);
  }
}
