/* Blog posts: one reading column on paper, the book's figures on white panels,
   the answer box and the book box as quiet cards. Red stays the guard's colour:
   it appears only in the figures and the status dot, never as decoration. */

.post-top { background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 0.95rem; }
.post-top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.9rem; }
.post-top a { color: var(--paper); text-decoration: none; font-weight: 600; }
.post-top a:hover { text-decoration: underline; }
.post-top .brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; font-variant-numeric: normal; }
.post-top .brand svg { flex: none; }
.post-top .brand:hover { text-decoration: none; }
.post-top .crumbs { color: var(--muted); }
.post-top .crumbs a { font-weight: 500; color: var(--muted); }

.post { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.post .measure { max-width: 42rem; margin: 0 auto; }
.post-kicker { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin: 0 0 0.9rem; }
.post h1 {
  font-weight: 700; font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.4rem);
  line-height: 1.06; letter-spacing: -0.015em; margin: 0 0 1.1rem;
  font-variant-numeric: normal;
}
.post-meta { font-family: var(--sans); font-size: 0.92rem; color: var(--slate); margin: 0 0 2.4rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.post-meta a { color: var(--text); }

.post-body h2 { font-size: clamp(1.55rem, 1.1rem + 1.4vw, 2rem); line-height: 1.18; margin: 2.4em 0 0.6em; }
.post-body h3 { font-size: 1.05rem; margin: 1.6em 0 0.4em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.post-body li { margin: 0 0 0.45em; }
.post-body pre {
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 0.8rem;
  line-height: 1.55; padding: 1rem 1.15rem; border-radius: 4px; overflow-x: auto; margin: 0 0 1.4em;
}
.post-body pre code { font-size: inherit; }
.post-body :not(pre) > code { background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 0.05em 0.3em; }
.post-body a { text-decoration-color: var(--slate); }

/* The answer box: the passage answer engines quote. */
.post-body blockquote.answer {
  margin: 1.8em 0 2.2em; padding: 1.15rem 1.35rem 1.15rem 1.25rem;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink);
  font-size: 1.08rem;
}
.post-body blockquote.answer::before {
  content: "The short answer"; display: block; margin-bottom: 0.35rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate);
}
.post-body blockquote.answer p:last-child { margin-bottom: 0; }
.post-body blockquote:not(.answer) { margin: 1.4em 0; padding-left: 1.1rem; border-left: 2px solid var(--line); color: var(--slate); }

/* Figures: the book's SVGs on their own white panel, wider than the text on big screens. */
.post-body figure { margin: 2.2em 0 2.4em; }
.post-body figure .panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: clamp(0.75rem, 2.5vw, 1.4rem); }
.post-body figure svg, .post-body figure img { width: 100%; height: auto; }
.post-body figcaption { font-family: var(--sans); font-size: 0.88rem; line-height: 1.5; color: var(--slate); margin-top: 0.7rem; }
@media (min-width: 60rem) { .post-body figure { margin-inline: -3rem; } .post-body figcaption { padding-inline: 3rem; } }

/* The mid-post book box. */
.book-box {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.1rem; align-items: start;
  margin: 2.4em 0; padding: 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--sans); font-size: 0.98rem; line-height: 1.55;
}
.book-box img { width: 4.5rem; height: auto; border-radius: 2px; box-shadow: 0 1px 3px rgba(18, 22, 31, 0.25); }
.book-box p { margin: 0 0 0.75rem; }
.book-box .book-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; margin: 0; }
.book-box .btn-ink { background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; padding: 0.55rem 1rem; border-radius: 3px; }
.book-box .btn-ink:hover { background: var(--ink-2); }

/* Questions people ask. */
.post-body h2#questions-people-ask + h3, .post-body .faq h3 { margin-top: 1em; }

/* The closing block, the same on every post. */
.post-end { background: var(--ink); color: var(--paper); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.post-end .measure { max-width: 42rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 40rem) { .post-end .measure { grid-template-columns: 8.5rem minmax(0, 1fr); align-items: start; gap: 2rem; } }
.post-end img { width: 8.5rem; height: auto; border-radius: 2px; }
.post-end h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 1.9rem); margin: 0 0 0.6rem; }
.post-end p { color: var(--muted); font-family: var(--sans); font-size: 1rem; }
.post-end .actions { margin-top: 1.2rem; }

.more-posts { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.more-posts .measure { max-width: 42rem; margin: 0 auto; }
.more-posts h2 { font-size: 1.4rem; margin-bottom: 1rem; }

/* Phones: let figures use the full screen width so their labels stay legible. */
@media (max-width: 39.99rem) {
  .post-body figure { margin-inline: calc(-1 * var(--gutter)); }
  .post-body figure .panel { border-radius: 0; border-inline: 0; padding: 0.6rem 0.4rem; }
  .post-body figcaption { padding-inline: var(--gutter); }
}

/* The /blog/ index. */
.blog-intro { font-size: 1.15rem; color: var(--slate); margin: 0 0 2.6rem; max-width: 36rem; }
.blog-intro a { color: var(--text); }
