/* The blog (/blog, /blog/<slug>), on top of main.css's .doc page. Same ink, bone and one
   orange accent; no cards. Article bodies use the markup of Anchor's article model:
   key takeaways, question headings, one pull quote a section, definitions, tables, FAQ,
   sources. Bump ?v= in blog.js when this changes. */

/* ---------- index ---------- */
.post-list { list-style: none; max-width: 46em; border-top: 1px solid var(--line); }
.post-item { border-bottom: 1px solid var(--line); }
.post-link {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
  color: inherit;
  text-decoration: none;
}
.post-title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.02;
  color: var(--paper);
  transition: color 0.12s ease;
}
.post-link:hover .post-title, .post-link:focus-visible .post-title { color: var(--accent); }
.post-excerpt { max-width: 40em; color: color-mix(in srgb, var(--paper) 78%, var(--dim)); line-height: 1.55; }
.post-date { font-size: 0.8rem; color: var(--dim); }
.doc-aside { margin-top: clamp(3rem, 7vw, 4.5rem); max-width: 40em; color: var(--dim); }
.doc-aside a { color: var(--paper); text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.doc-aside a:hover { color: var(--accent); }

/* ---------- article ---------- */
/* main.css frames `section`; an article gets the same frame and the .doc top space. */
article.post {
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gutter) var(--sec-pad);
  max-width: var(--max);
  margin-inline: auto;
}
.post-crumb { font-size: 0.8rem; margin-bottom: 1.25rem; }
.post-crumb a { color: var(--dim); text-decoration: none; }
.post-crumb a:hover { color: var(--accent); }
.post-h { font-size: clamp(2.4rem, 7vw, 4.6rem); max-width: 16em; line-height: 0.98; }
.post-meta { font-size: 0.85rem; color: var(--dim); margin-bottom: clamp(2rem, 5vw, 3rem); }
.post-hero { max-width: 52rem; margin: 0 0 clamp(2.5rem, 6vw, 3.5rem); border-radius: 14px; overflow: hidden; background: var(--ink-2); }
.post-hero img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.post-body { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem); line-height: 1.7; }
.post-body > p:first-child { font-size: 1.15em; color: var(--paper); line-height: 1.55; }
.post-body h2 { margin-top: clamp(3rem, 7vw, 4rem); }
.post-body h3 { font-weight: 700; color: var(--paper); font-size: 1.1em; margin: 2rem 0 0.6rem; }
.post-body p + p { margin-top: 1.1rem; }
.post-body ul, .post-body ol { margin-top: 1rem; padding-left: 1.3rem; }
.post-body li + li { margin-top: 0.45rem; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--paper); }

/* The section's one quotable line: set big in the display face, no rule beside it. */
.post-body blockquote {
  margin: clamp(2rem, 5vw, 2.75rem) 0;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.08;
  color: var(--paper);
}
.post-body blockquote p { margin: 0; }

.post-body .key-takeaways {
  margin: 0 0 clamp(2.5rem, 6vw, 3.5rem);
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-body .key-takeaways h2 {
  margin: 0 0 0.75rem;
  font-family: var(--body);
  text-transform: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
}
.post-body .key-takeaways ul { margin-top: 0; }

.post-body dl.definitions { margin: 1.5rem 0; display: grid; gap: 1rem; }
.post-body dl.definitions dt { color: var(--paper); font-weight: 700; }
.post-body dl.definitions dd { margin-top: 0.2rem; }

/* Tables carry the arithmetic: hairline rows, figures right-aligned in tabular digits. */
.post-body table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td { padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body th { color: var(--paper); font-weight: 700; border-bottom-color: color-mix(in srgb, var(--paper) 40%, transparent); }
.post-body td:not(:first-child), .post-body th:not(:first-child) { text-align: right; white-space: nowrap; }

.post-body .faq .faq-item + .faq-item { margin-top: 1.5rem; }
.post-body .faq h3 { margin-top: 0; }

.post-body .sources { font-size: 0.88em; color: var(--dim); }
.post-body .sources h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.post-body .sources a { overflow-wrap: anywhere; }
