/* Blog: same white lab sheet as site.css. Uses its tokens; adds the logo
   plate header, post cards, the article column and the newsletter panel. */

.kicker { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0; color: var(--violet); margin: 0; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); }

/* ---------- Header with the logo plate ---------- */
.blog-head { position: relative; border-bottom: 1px solid var(--rule); background: var(--paper); overflow: hidden; }
.blog-head.is-author::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to bottom, rgba(244, 243, 248, 0), var(--floor)); pointer-events: none;
}
.blog-head.is-author .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: center; padding-block: clamp(36px, 6vw, 80px); }
/* Index and category heads use the site's render stage (site.css .stage.compact); the logo file is the still until WebGL draws. */
.blog-head .logo-still { padding: 14%; }
.blog-head-copy { display: grid; gap: 18px; align-content: start; }
.blog-head h1 { font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.05; }
.blog-head .lede { font-size: var(--t-l); color: var(--graphite); max-width: 26.9em; line-height: 1.45; }
.blog-bio { color: var(--graphite); max-width: 36.68em; }
.blog-head-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--t-s); }
.blog-head-links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.blog-head-links a:hover { color: var(--violet); border-color: var(--violet); }

.logo-plate {
  margin: 0; justify-self: end; width: min(100%, 340px); aspect-ratio: 1 / 1.08; position: relative;
  display: grid; grid-template-rows: 1fr auto; border: 1px solid var(--rule); border-radius: 14px;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px;
  box-shadow: 0 30px 60px -40px rgba(67, 32, 163, .45);
}
.logo-plate img { width: 68%; height: auto; margin: auto; align-self: center; filter: drop-shadow(0 18px 22px rgba(67, 32, 163, .22)); }
.logo-plate figcaption {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--rule);
  background: var(--paper); border-radius: 0 0 14px 14px; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--graphite);
}

.profile-plate { justify-self: end; width: min(100%, 380px); border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); overflow: hidden; }
.profile-id { display: flex; align-items: center; gap: 14px; padding: 18px; border-bottom: 1px solid var(--rule); background: var(--floor); }
.profile-id img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-id strong { display: block; font-size: var(--t-l); letter-spacing: -.01em; }
.profile-id span { color: var(--graphite); font-size: var(--t-s); }
.profile-plate dl { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); }
.profile-plate dt, .profile-plate dd { margin: 0; padding: 11px 18px; border-top: 1px solid var(--rule); font-size: var(--t-s); }
.profile-plate dl > dt:first-of-type, .profile-plate dl > dt:first-of-type + dd { border-top: 0; }
.profile-plate dt { color: var(--graphite); }
.profile-plate dd { font-family: var(--font-mono); font-size: .875rem; overflow-wrap: anywhere; }
.monogram { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--violet-wash); color: var(--violet-deep); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; flex: none; }
.monogram.small { width: 40px; height: 40px; font-size: .95rem; }

/* ---------- Category bar ---------- */
.cat-bar { border-bottom: 1px solid var(--rule); background: var(--paper); }
.cat-bar ul { list-style: none; margin: 0; padding: 12px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.cat-bar a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: var(--t-s);
}
.cat-bar a:hover { border-color: var(--ink); }
.cat-bar a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cat-bar .count { font-family: var(--font-mono); font-size: var(--t-xs); opacity: .7; }

/* ---------- Post cards ---------- */
.blog-doc { padding-block: clamp(36px, 6vw, 72px); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px 36px; }
.post-card { display: grid; gap: 16px; align-content: start; border-top: 2px solid var(--ink); padding-top: 18px; }
.post-card-media { display: block; border-radius: 10px; overflow: hidden; background: var(--floor); aspect-ratio: 16 / 9; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-media img { transform: scale(1.02); }
.post-card-body { display: grid; gap: 10px; }
.post-card h3 { font-size: var(--t-l); }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--violet); }
.post-card-excerpt { color: var(--graphite); font-size: var(--t-s); }
.post-card-author { font-size: var(--t-xs); color: var(--mist); }
.post-card-author a { color: var(--graphite); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--t-xs); color: var(--mist); font-family: var(--font-mono); }
.post-cat { color: var(--violet); text-decoration: none; }
.post-cat:hover { text-decoration: underline; }
.post-card.lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.post-card.lead.no-cover { grid-template-columns: minmax(0, 1fr); }
.post-card.lead h3 { font-size: var(--t-2xl); }
.post-card.lead .post-card-excerpt { font-size: var(--t-m); }

.pager { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.pager ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; font-family: var(--font-mono); font-size: var(--t-s); }
.pager ol a, .pager ol span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.pager ol a:hover { background: var(--floor); }
.pager ol span[aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- Empty state ---------- */
.empty-state { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; padding-bottom: 24px; }
.empty-state.compact { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.empty-head { display: grid; gap: 12px; align-content: start; }
.empty-head h2 { font-size: var(--t-xl); }
.empty-head p:not(.kicker) { color: var(--graphite); }
.empty-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 32px; border-top: 2px solid var(--ink); }
.empty-cats li { padding: 18px 24px 18px 0; border-bottom: 1px solid var(--rule); }
.empty-cats h3 { font-size: var(--t-m); margin-bottom: 4px; }
.empty-cats h3 a { color: var(--ink); text-decoration: none; }
.empty-cats h3 a:hover { color: var(--violet); }
.empty-cats p { color: var(--graphite); font-size: var(--t-s); }
.empty-aside { grid-column: 2; font-size: var(--t-s); color: var(--graphite); }

/* ---------- Newsletter ---------- */
.newsletter {
  margin-top: clamp(40px, 6vw, 72px); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--rule); border-radius: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; align-items: center;
  background: var(--floor);
}
.newsletter-copy { display: grid; gap: 10px; }
.newsletter h2 { font-size: var(--t-xl); }
.newsletter-copy p:not(.kicker) { color: var(--graphite); font-size: var(--t-s); max-width: 31.79em; }
.newsletter-form { display: grid; gap: 8px; }
.newsletter-form label { font-size: var(--t-s); font-weight: 600; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; min-width: 0; background: var(--paper); }
.newsletter-note { font-size: var(--t-xs); color: var(--mist); }

/* ---------- Single post ---------- */
.preview-bar { background: #fff6e0; border-bottom: 1px solid #f0d9a0; font-size: var(--t-s); color: #5c3d00; }
.preview-bar .wrap { padding-block: 10px; }
.preview-bar strong { font-family: var(--font-mono); margin-right: 8px; }
.post-head { border-bottom: 1px solid var(--rule); background: linear-gradient(to bottom, var(--paper) 40%, var(--floor)); }
.post-head .wrap { display: grid; gap: 18px; padding-block: clamp(32px, 5vw, 64px); max-width: 1120px; margin-inline: auto; }
.post-head h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.06; max-width: 15.36em; }
.post-head .lede { font-size: var(--t-l); color: var(--graphite); max-width: 36.68em; line-height: 1.45; }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 18px; border-top: 1px solid var(--rule); }
.byline-author { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.byline-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline-author strong { display: block; font-size: var(--t-s); }
.byline-author span span { display: block; font-size: var(--t-xs); color: var(--graphite); }
.byline-author:hover strong { color: var(--violet); }
.byline-facts { display: flex; gap: 28px; margin: 0; }
.byline-facts div { display: grid; gap: 2px; }
.byline-facts dt { font-size: var(--t-xs); color: var(--mist); }
.byline-facts dd { margin: 0; font-family: var(--font-mono); font-size: var(--t-s); }

.post-cover { margin: clamp(24px, 4vw, 48px) auto 0; max-width: 1240px; }
.post-cover img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--rule); }
.post-cover figcaption { font-size: var(--t-xs); color: var(--mist); margin-top: 10px; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; padding-block: clamp(32px, 5vw, 64px); max-width: 1120px; }
.post-aside { position: sticky; top: 100px; align-self: start; display: grid; gap: 22px; font-size: var(--t-s); }
.aside-block { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
.aside-block p:not(.kicker) { color: var(--graphite); }
.aside-block a { color: var(--ink); }
.aside-bio { font-size: var(--t-xs); }

/* Article typography: what the editor produces. */
.article { max-width: 42.79em; font-size: 1.125rem; line-height: 1.72; color: #2b2838; }
.article > * + * { margin-top: 1.1em; }
.article h2 { font-size: var(--t-xl); margin-top: 1.9em; color: var(--ink); }
.article h3 { font-size: var(--t-l); margin-top: 1.6em; color: var(--ink); }
.article h4 { font-size: var(--t-m); margin-top: 1.4em; color: var(--ink); }
.article h2 + *, .article h3 + *, .article h4 + * { margin-top: .6em; }
.article p, .article li { color: #2b2838; }
.article ul, .article ol { padding-left: 1.3em; display: grid; gap: .45em; }
.article li::marker { color: var(--violet); }
.article strong { font-weight: 650; color: var(--ink); }
.article a { color: var(--violet); }
.article img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); margin-block: .4em; }
.article blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--violet); color: var(--ink); font-size: var(--t-l); line-height: 1.5; }
.article code { background: var(--floor); border: 1px solid var(--rule); border-radius: 4px; padding: .08em .35em; font-size: .86em; }
.article pre { background: #15121f; color: #ece9f7; border-radius: 10px; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: .875rem; line-height: 1.6; white-space: pre; }
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.article hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2em; }
.article table { display: block; overflow-x: auto; min-width: 0; border: 1px solid var(--rule); border-radius: 10px; font-size: var(--t-s); }
.article th, .article td { min-width: 120px; }
.article tr:first-child td, .article tr:first-child th { border-top: 0; }
.article .ql-align-center { text-align: center; }
.article .ql-align-right { text-align: right; }
.article .ql-align-justify { text-align: justify; }

.post-after { padding-top: 0; }
.related-posts { display: grid; gap: 24px; padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--rule); }
.related-posts h2 { font-size: var(--t-xl); }

/* ---------- Message pages (subscribe, confirm, unsubscribe) ---------- */
.blog-message { background: linear-gradient(to bottom, var(--paper), var(--floor)); border-bottom: 1px solid var(--rule); }
.blog-message .wrap { padding-block: clamp(56px, 10vw, 120px); }
.message-card { max-width: 560px; display: grid; gap: 18px; padding: clamp(24px, 4vw, 40px); background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 24px 48px -32px rgba(21, 18, 31, .3); }
.message-card img { width: 56px; height: 56px; }
.message-card h1 { font-size: var(--t-2xl); }
.message-card p { color: var(--graphite); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .blog-head.is-author .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .logo-plate { justify-self: start; width: min(100%, 260px); }
  .profile-plate { justify-self: stretch; width: 100%; }
  .post-card.lead { grid-template-columns: minmax(0, 1fr); }
  .post-card.lead h3 { font-size: var(--t-xl); }
  .empty-state { grid-template-columns: minmax(0, 1fr); }
  .empty-aside { grid-column: 1; }
  .newsletter { grid-template-columns: minmax(0, 1fr); }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .post-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 560px) {
  .logo-plate { width: 200px; }
  .newsletter-row { flex-direction: column; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager ol { grid-column: 1 / -1; grid-row: 1; }
  .byline-facts { gap: 20px; }
  .article { font-size: 1.0625rem; }
}
