/* Blog: the legal pages' reading layout (pages-reading.css, site.css) carried to articles and listings.
   Same tokens, measures and rhythm; only what articles need beyond a legal section is added here. */

/* Listing and category pages */
.blog-index { padding-block: 32px 80px; border-top: 1px solid var(--line); }
.blog-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.blog-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding-block: 32px 40px; border-bottom: 1px solid var(--line); }
.blog-card h2, .blog-card h3 { font-size: var(--text-title); line-height: 1.3; letter-spacing: -.03em; }
.blog-card h2 a, .blog-card h3 a { transition: color 180ms var(--ease); }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--iris); }
.blog-card>p:not(.blog-meta) { font-size: var(--text-small); line-height: 1.8; color: var(--muted); }
.blog-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--text-meta); color: var(--muted); }
.blog-meta a { color: var(--iris); font-weight: 600; }
.blog-empty { max-width: 56ch; padding-block: 32px 16px; }
.blog-empty h2 { font-size: var(--text-title); line-height: 1.35; margin-bottom: 12px; }
.blog-empty p { font-size: var(--text-body); line-height: 1.8; color: var(--muted); }
.blog-pagination { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; font-size: var(--text-small); color: var(--muted); }
.blog-pagination .text-link { min-height: 44px; color: var(--ink); }
.blog-newer svg { transform: scaleX(-1); }
.blog-related { padding-block: 48px 32px; border-top: 1px solid var(--line); }
.blog-related>h2 { font-size: var(--text-subhead); line-height: 1.25; letter-spacing: -.035em; }

/* Listing and category header: eyebrow, heading, summary and the category pills */
.blog-eyebrow { margin-bottom: 18px; font-size: var(--text-meta); font-weight: 700; letter-spacing: .065em; text-transform: uppercase; color: var(--ink); }
.blog-hero .page-lead { color: var(--ink); }
.blog-pills { margin-top: 36px; }
.blog-pills ul { list-style: none; margin: 0; padding: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.blog-pills a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid oklch(23% .033 283 / .18); background: oklch(100% 0 0 / .62);
  color: var(--ink); font-size: var(--text-small); font-weight: 600; white-space: nowrap; transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
.blog-pills a:hover { background: var(--white); border-color: var(--ink); }
.blog-pills a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.blog-pills a:focus-visible, .article-tag:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Article header: on the category gradient, every line in ink (AA on each gradient, tests/blog-theme.test.mjs) */
.article-hero h1 { max-width: 22ch; }
.article-hero .page-lead { max-width: 60ch; margin-top: 24px; color: var(--ink); }
.article-tag { display: inline-flex; align-items: center; min-height: 32px; margin-bottom: 24px; padding: 0 14px; border-radius: 999px; background: oklch(100% 0 0 / .62);
  color: var(--ink); font-size: var(--text-meta); font-weight: 650; transition: background-color 180ms var(--ease); }
.article-tag:hover { background: var(--white); }
.article-attribution { display: grid; gap: 6px; margin-top: 28px; font-size: var(--text-small); color: var(--ink); }
.article-attribution p { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink); }
.article-attribution strong { color: var(--ink); font-weight: 650; }
.article-hero .article-back { margin-top: 32px; }

/* Article body: a legal section's type, plus subheadings, quotes, numbered lists, code, tables and rules */
.article-section { padding-block: 32px; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.article-document>.article-section:first-child, .article-image+div.article-section { border-top: 0; padding-top: 0; }
.article-section h2 { font-size: var(--text-title); line-height: 1.35; letter-spacing: -.035em; margin-bottom: 16px; }
.article-section h3 { font-size: 1.25rem; line-height: 1.4; letter-spacing: -.025em; margin: 32px 0 12px; }
.article-section h4 { font-size: var(--text-body); line-height: 1.5; font-weight: 650; margin: 24px 0 8px; }
.article-section p, .article-section li { font-size: var(--text-body); line-height: 1.8; color: var(--muted); }
.article-section p+p { margin-top: 16px; }
.article-section :is(ul, ol) { padding-left: 23px; margin-block: 16px; }
.article-section li { padding-left: 5px; margin-bottom: 8px; }
.article-section ol>li::marker { color: var(--iris); font-variant-numeric: tabular-nums; }
.article-section strong { font-weight: 700; color: var(--ink); }
.article-section a:not(.text-link) { color: var(--iris); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.article-section code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875em; padding: 2px 6px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.article-section blockquote { margin: 24px 0; padding-left: 24px; border-left: 2px solid var(--iris); }
.article-section blockquote p { font-size: var(--text-lead); line-height: 1.6; color: var(--ink); }
.article-section hr { border: 0; border-top: 1px solid var(--line); margin-block: 32px; }
/* A divider that ends a section would double the next section's rule. */
.article-section>hr:last-child { display: none; }
.article-table { margin-block: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.article-table:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; }
.article-table table { width: 100%; border-collapse: collapse; font-size: var(--text-small); line-height: 1.6; }
.article-table caption { caption-side: top; text-align: left; padding: 16px 20px 0; font-size: var(--text-meta); color: var(--muted); }
.article-table :is(th, td) { padding: 12px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.article-table tbody tr:last-child td { border-bottom: 0; }
.article-table th { font-weight: 650; color: var(--ink); }
.article-table td { color: var(--muted); }
.article-image { margin: 0 0 32px; }
.article-image img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.article-faq .faq-list details>p { font-size: var(--text-small); }
.article-faq .faq-list details>p:not(:last-child) { padding-bottom: 0; }
.article-faq .faq-list summary { font-size: var(--text-body); }
.article-sources li { font-size: var(--text-small); }
.article-back { padding-top: 16px; }
.article-back .text-link { min-height: 44px; }

@media (max-width: 1000px) {
  .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
}
@media (max-width: 760px) {
  /* One row that scrolls sideways; app.js brings the current pill into view. */
  .blog-pills { margin-top: 28px; }
  .blog-pills ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .blog-pills ul::-webkit-scrollbar { display: none; }
  .blog-index { padding-block: 16px 48px; }
  .blog-list { grid-template-columns: 1fr; }
  .blog-card { padding-block: 24px 28px; }
  .blog-related { padding-block: 32px 16px; }
  .blog-related>h2 { font-size: var(--text-title); }
  .article-section { padding-block: 28px; }
  .article-section h2 { font-size: 1.25rem; }
  .article-table :is(th, td) { padding: 10px 14px; }
}

/* Category artwork follows the existing card and reading-page geometry. */
.blog-card-image { display: block; aspect-ratio: 1.9; border-radius: 16px; overflow: hidden; margin-bottom: 8px; }
.blog-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-meta .blog-date, .blog-duration { white-space: nowrap; }
.blog-meta>a { flex-basis: 100%; }
.blog-duration>span { margin-right: 6px; }
