/* Blog: article and index pages. Sits on catalog.css (tokens, footer, buttons).
   Mobile-first; one reading column of ~68ch; each shelf tints its accents. */
.blog { --tint: #f8dcc4; --mark: #9c2f49; background: var(--paper); }
[data-shelf="crumb"]   { --tint: #f8dcc4; --mark: #9c2f49; }
[data-shelf="catdoku"] { --tint: #d9f0ee; --mark: #0b7570; }
[data-shelf="spy"]     { --tint: #e4defd; --mark: #4a2fc4; }
[data-shelf="retired"] { --tint: #f6e5b4; --mark: #b42c25; }

.blog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1040px; margin: 0 auto; padding: 16px 20px; }
.blog-nav { display: flex; gap: 18px; font-family: var(--font-mono); font-size: .9rem; }
.blog-nav a { text-decoration: none; color: var(--ink); }
.blog-nav a:hover { color: var(--brick-deep); }

/* Article */
.post article, .related, .blog-index { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.post-head { padding: 8px 0 18px; }
.crumbs { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.crumbs a { color: var(--mark); text-decoration: none; }
.post h1 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.75rem, 6.2vw, 2.6rem); line-height: 1.1; margin: 10px 0 12px; }
.dek { font-size: 1.12rem; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }
.byline { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: 0; }
.post-hero { margin: 0 -20px 8px; }
.post-hero img { width: 100%; height: auto; }
@media (min-width: 760px) { .post-hero { margin: 0 0 8px; } .post-hero img { border-radius: 14px; } }

.post-body { font-size: 1.1rem; line-height: 1.7; }
.post-body h2 { font-family: var(--font-ui); font-weight: 800; font-size: 1.5rem; line-height: 1.2;
  margin: 2em 0 .5em; letter-spacing: -.01em; }
.post-body h2::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px;
  background: var(--mark); margin-bottom: 12px; }
.post-body h3 { font-family: var(--font-ui); font-weight: 750; font-size: 1.18rem; margin: 1.6em 0 .35em; }
.post-body p, .post-body li { overflow-wrap: break-word; }
.post-body a { color: var(--mark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.post-body a.ibtn { text-decoration: none; }
.post-body a.ibtn-amazon { color: #131921; }
.post-body a.ibtn-play { color: var(--sheet); }
.post-body li + li { margin-top: .35em; }
.post-body ul, .post-body ol { padding-left: 1.25em; }

.post-figure { margin: 1.6em 0; background: var(--tint); border-radius: 14px; padding: 16px; }
.post-figure img { width: 100%; max-width: 440px; height: auto; margin: 0 auto; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(40, 30, 20, .14); }
.post-figure.narrow img { max-width: 360px; }
.post-figure figcaption { font-family: var(--font-mono); font-size: .8rem; color: var(--ink);
  text-align: center; margin-top: 12px; line-height: 1.45; }

/* Book card: the one call to action, honest label */
.book-card { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center;
  background: var(--tint); border-radius: 16px; padding: 16px; margin: 1.8em 0; }
.book-cover img { width: 96px; height: auto; border-radius: 3px; box-shadow: 0 8px 18px rgba(40, 30, 20, .22); }
.book-text p { margin: 0; }
.book-kicker { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mark); }
.book-title { font-family: var(--font-ui); font-weight: 800; font-size: 1.12rem; line-height: 1.2; margin: 2px 0 4px !important; }
.book-line { font-size: .95rem; line-height: 1.45; margin-bottom: 12px !important; }
.book-card .ibtn { height: 42px; font-size: 14px; }
@media (min-width: 560px) { .book-card { grid-template-columns: 128px 1fr; gap: 22px; padding: 20px; } .book-cover img { width: 128px; } }

.cipher { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em;
  background: var(--coal); color: var(--sheet); border-radius: 10px; padding: 14px 16px; overflow-x: auto; white-space: nowrap; }
.key-grid { display: grid; gap: 4px; font-family: var(--font-mono); font-weight: 700; background: var(--tint);
  border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; }
.answer { margin: -.4em 0 1em; }
.answer summary, .faq summary { cursor: pointer; font-family: var(--font-ui); font-weight: 650; color: var(--mark); min-height: 44px; display: flex; align-items: center; }
.answer p { font-family: var(--font-mono); font-weight: 700; margin: .2em 0 0; }
.card-lines li { font-style: italic; }

.table-wrap { overflow-x: auto; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { font-family: var(--font-ui); background: var(--tint); }

.post .faq { max-width: none; padding: 8px 0 0; margin-top: 2.4em; border-top: 1px solid var(--line); }
.post .faq h2 { font-family: var(--font-ui); font-weight: 800; font-size: 1.35rem; margin: 1em 0 .4em; }
.post .faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.post .faq p { margin: 0 0 14px; line-height: 1.6; }

.related { margin-top: 40px; padding-bottom: 40px; }
.related h2 { font-family: var(--font-ui); font-weight: 800; font-size: 1.2rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.related a { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--ink);
  font-family: var(--font-ui); font-weight: 700; line-height: 1.3; }
.related img { width: 120px; height: auto; border-radius: 8px; }
@media (min-width: 760px) { .related ul { grid-template-columns: repeat(3, 1fr); } .related a { grid-template-columns: 1fr; } .related img { width: 100%; } }

/* Index */
.index-head { padding: 12px 0 18px; }
.index-head h1 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.02em; font-size: clamp(2rem, 7vw, 2.8rem); margin: 0 0 6px; }
.cards { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 22px; }
@media (min-width: 680px) { .cards { grid-template-columns: 1fr 1fr; } }
.card a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--sheet);
  border-radius: 16px; overflow: hidden; height: 100%; box-shadow: 0 1px 0 var(--line); }
.card img { width: 100%; height: auto; }
.card-kicker { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mark); padding: 8px 16px 0; }
.card-title { font-family: var(--font-ui); font-weight: 800; font-size: 1.2rem; line-height: 1.25; padding: 0 16px; }
.card-dek { font-size: .95rem; color: var(--muted); line-height: 1.45; padding: 0 16px 18px; }
.card a:hover .card-title { color: var(--mark); }
