/* ==========================================================================
   Blog: listing (index.php) + article (single.php)
   Loaded on top of about.css + wp.css on blog screens only.
   ========================================================================== */
.bl {
  --bl-ink: #171a20;
  --bl-text: #3a3f4a;
  --bl-muted: #5c6270;
  --bl-faint: #7b8190;
  --bl-line: #e8e8e6;
  --bl-gold: #9a7300;
  --bl-yellow: #fec401;
  --bl-cream: #f8f6f0;
  --bl-panel: #f4f3ef;
  background: #fff;
  color: var(--bl-ink);
}
.bl-wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.bl a { color: inherit; }
.bl-dot { margin: 0 .55em; }

/* shared small type */
.bl-kicker, .bl-eyebrow, .bl-meta, .bl-side-label, .bl-line-label, .bl-tag, .bl-news-eyebrow {
  font-family: "Fira Code", ui-monospace, monospace;
  text-transform: uppercase;
}
.bl-eyebrow { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--bl-gold); }
.bl-meta { margin: 0; font-size: 12px; letter-spacing: .12em; color: var(--bl-faint); }
.bl-side-label { margin: 0; font-size: 11px; letter-spacing: .2em; color: var(--bl-faint); }

/* buttons */
.bl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 8px; background: var(--bl-yellow);
  color: #1e1e1e !important; font: 500 16px/1.2 "DM Sans", sans-serif; text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.bl-btn:hover { background: #ffd23a; }
.bl-btn:active { transform: translateY(1px); }
.bl-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 22px; border: 1px solid #e2e4e8; border-radius: 999px; background: #fff;
  color: var(--bl-ink); font: 500 14px/1.2 "DM Sans", sans-serif; text-decoration: none; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.bl-pill:hover { border-color: var(--bl-ink); }
.bl-btn:focus-visible, .bl-pill:focus-visible, .bl a:focus-visible { outline: 2px solid var(--bl-yellow); outline-offset: 3px; }

/* ---------- Listing hero ---------- */
.bl-hero { padding: 80px 0 52px; background: linear-gradient(180deg, var(--bl-cream) 0%, #fff 100%); }
.bl-kicker { margin: 0 0 22px; font-size: 13px; letter-spacing: .12em; color: #6b6f78; }
.bl-hero h1 { margin: 0; max-width: 1000px; font-weight: 500; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.06; letter-spacing: -.035em; color: var(--bl-ink); text-wrap: balance; }
.bl-lead { margin: 22px 0 0; max-width: 620px; font-size: 18px; line-height: 1.6; color: var(--bl-muted); }

.bl-filters { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 36px; }
.bl-filters a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  font: 500 16px/1.2 "Golos Text", sans-serif; color: #2b2f36; text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.bl-filters a:hover { background: #efede6; }
.bl-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ebe9e2; font: 500 11px/1 "DM Sans", sans-serif; color: #5c5e62; }
.bl-filters a[aria-current="page"] { background: var(--bl-ink); color: #fff; }
.bl-filters a[aria-current="page"] .bl-count { background: var(--bl-yellow); color: #1e1e1e; }

/* ---------- Featured post ---------- */
.bl-list { padding: 4px 0 96px; }
.bl-featured { display: grid; grid-template-columns: 1fr 1fr; min-height: 394px; border-radius: 16px; overflow: hidden; background: var(--bl-panel); }
.bl-featured-img { position: relative; display: block; overflow: hidden; }
.bl-featured-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bl-featured:hover .bl-featured-img img { transform: scale(1.03); }
.bl-featured-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 48px; }
.bl-featured h2 { margin: 18px 0 0; font-weight: 500; font-size: clamp(26px, 2.5vw, 32px); line-height: 1.22; letter-spacing: -.025em; }
.bl-featured h2 a { text-decoration: none; }
.bl-featured h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bl-featured-text { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--bl-muted); }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.bl-chips a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #e9e7e1; font-size: 13px; color: #2b2f36; text-decoration: none; }
.bl-chips .is-cat a { background: #fff1b8; }
.bl-chips a:hover { background: var(--bl-yellow); }
.bl-featured .bl-meta { margin-top: 18px; }
.bl-featured .bl-btn { margin-top: 20px; }

/* ---------- Card grid ---------- */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 36px; align-items: start; margin-top: 56px; }
.bl-card { display: flex; flex-direction: column; border: 1px solid #ececea; border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .3s ease, transform .3s ease; }
.bl-card:hover { box-shadow: 0 20px 40px -24px rgba(16, 20, 28, .28); transform: translateY(-2px); }
.bl-card-img { display: block; aspect-ratio: 376 / 240; overflow: hidden; background: #eceae4; }
.bl-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bl-card:hover .bl-card-img img { transform: scale(1.04); }
.bl-card-body { display: flex; flex-direction: column; padding: 28px 24px 26px; }
.bl-card-title { margin: 16px 0 0; font-weight: 500; font-size: 20px; line-height: 1.3; letter-spacing: -.015em; }
.bl-card-title a { text-decoration: none; }
.bl-card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.bl-card { position: relative; }
.bl-card-text { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--bl-muted); }
.bl-card .bl-meta { margin-top: 18px; }

/* ---------- Pagination ---------- */
.bl-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 64px; }
.bl-pages > * {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 14px;
  border: 1px solid #e6e7ea; border-radius: 8px; background: #fff;
  font: 500 14px/1 "DM Sans", sans-serif; color: var(--bl-ink); text-decoration: none;
}
.bl-pages a:hover { border-color: var(--bl-ink); }
.bl-pages .current { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff; padding: 0 12px; }
.bl-pages .is-off { color: #a6a9b0; }
.bl-pages .dots { border-color: transparent; }
.bl-empty { margin: 32px 0 0; font-size: 18px; color: var(--bl-muted); }

/* ---------- Newsletter ---------- */
.bl-news {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  margin-top: 64px; padding: 48px 50px; border-radius: 20px; background: #1b1d22; color: #fff;
}
.bl-news-eyebrow { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--bl-yellow); }
.bl-news h2 { margin: 10px 0 0; font: 400 clamp(26px, 2.6vw, 34px)/1.15 "DM Sans", sans-serif; letter-spacing: -.01em; }
.bl-news-form { position: relative; display: flex; gap: 12px; flex: 0 1 460px; }
.bl-news-form input[type="email"] {
  flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid #34373e; border-radius: 8px;
  background: #24272d; color: #fff; font: 400 16px "DM Sans", sans-serif;
}
.bl-news-form input[type="email"]::placeholder { color: #8b8f98; }
.bl-news-form input[type="email"]:focus { outline: none; border-color: var(--bl-yellow); }
.bl-news-form button {
  flex: 0 0 auto; height: 48px; padding: 0 26px; border: 0; border-radius: 8px; background: var(--bl-yellow);
  color: #1e1e1e; font: 500 17px "DM Sans", sans-serif; cursor: pointer;
}
.bl-news-form button:hover { background: #ffd23a; }
.bl-news-form button:disabled { opacity: .6; cursor: default; }
.bl-news-note { position: absolute; left: 0; top: calc(100% + 8px); margin: 0; font-size: 14px; color: #c9f2d0; }
.bl-news-note.is-error { color: #ffc9c9; }
.bl-news-note:empty { display: none; }

/* ==========================================================================
   Article
   ========================================================================== */
.bl-post-hero { padding: 52px 0 44px; text-align: center; }
.bl-post-hero .bl-wrap { display: flex; flex-direction: column; align-items: center; }
.bl-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border: 1px solid #e2e4e8; border-radius: 999px;
  background: #fff; font: 500 15px/1 "DM Sans", sans-serif; color: var(--bl-ink); text-decoration: none;
}
.bl-back:hover { border-color: var(--bl-ink); }
.bl-tag { margin-top: 22px; padding: 8px 14px; border-radius: 999px; background: #eef1f5; font-size: 12px; letter-spacing: .14em; color: #3b4252; text-decoration: none; }
.bl-post-hero h1 { margin-top: 26px; max-width: 900px; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.12; }
.bl-post-hero .bl-lead { max-width: 640px; margin-top: 20px; }
.bl-byline { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 26px; text-align: left; }
.bl-avatar { flex: 0 0 auto; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #1b1d22; color: var(--bl-yellow); font: 600 14px/1 "DM Sans", sans-serif; letter-spacing: .02em; }
.bl-byline-who { display: flex; flex-direction: column; gap: 3px; }
.bl-byline-who strong { font-weight: 500; font-size: 15px; }
.bl-byline-who span { font-size: 12.5px; color: var(--bl-faint); }
.bl-byline-sep { width: 1px; height: 28px; background: #dcdde1; }

.bl-cover { margin-top: 0; margin-bottom: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 1200 / 600; background: #eceae4; }
.bl-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.bl-article {
  display: grid; grid-template-columns: 250px minmax(0, 720px) 130px; justify-content: space-between; gap: 48px;
  width: min(1280px, calc(100% - 48px)); margin: 80px auto 0;
}
.bl-article.no-toc { grid-template-columns: minmax(0, 720px) 130px; justify-content: center; gap: 80px; }
.bl-toc, .bl-share { position: sticky; top: 104px; align-self: start; }
.bl-toc ol { margin: 18px 0 0; padding: 0; list-style: none; }
.bl-toc li + li { margin-top: 14px; }
.bl-toc a { display: block; font-size: 15px; line-height: 1.55; color: var(--bl-muted); text-decoration: none; transition: color .2s ease; }
.bl-toc a:hover { color: var(--bl-ink); }
.bl-toc a.is-active { color: var(--bl-gold); font-weight: 500; }
.bl-share { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bl-share .bl-side-label { margin-bottom: 8px; }

/* article body */
.bl-entry { min-width: 0; font-size: 18px; line-height: 1.72; color: var(--bl-text); }
.bl-entry > :first-child { margin-top: 0; }
.bl-entry p, .bl-entry ul, .bl-entry ol, .bl-entry figure, .bl-entry table { margin: 0 0 24px; }
.bl-entry h2, .bl-entry h3, .bl-entry h4 { color: var(--bl-ink); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; scroll-margin-top: 100px; }
.bl-entry h2 { margin: 44px 0 22px; font-size: 30px; }
.bl-entry > h2:first-child { margin-top: 0; }
.bl-entry h3 { margin: 36px 0 14px; font-size: 22px; }
.bl-entry h4 { margin: 28px 0 10px; font-size: 19px; }
.bl-entry a { color: var(--bl-ink); text-decoration: underline; text-decoration-color: var(--bl-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bl-entry strong { color: var(--bl-ink); font-weight: 600; }
.bl-entry ul { padding: 0; list-style: none; }
.bl-entry ul li { position: relative; padding-left: 20px; }
.bl-entry ul li + li { margin-top: 12px; }
.bl-entry ul li::before { content: ""; position: absolute; left: 0; top: .66em; width: 7px; height: 7px; border-radius: 50%; background: var(--bl-yellow); }
.bl-entry ol { padding-left: 22px; }
.bl-entry ol li + li { margin-top: 10px; }
.bl-entry ol li::marker { color: var(--bl-gold); font-weight: 600; }
.bl-entry img, .bl-entry video, .bl-entry iframe { max-width: 100%; height: auto; border-radius: 12px; }
.bl-entry figcaption { margin-top: 10px; font-size: 14px; color: var(--bl-faint); text-align: center; }
.bl-entry table { width: 100%; border-collapse: collapse; font-size: 16px; }
.bl-entry th, .bl-entry td { padding: 12px 14px; border-bottom: 1px solid var(--bl-line); text-align: left; }
.bl-entry th { color: var(--bl-ink); font-weight: 500; background: #fafaf8; }
.bl-entry hr { margin: 40px 0; border: 0; border-top: 1px solid var(--bl-line); }
.bl-entry blockquote { margin: 32px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--bl-yellow); font-size: 20px; color: var(--bl-ink); }
.bl-entry blockquote p { margin: 0; }
.bl-entry blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--bl-faint); }

/* Callout: Quote or Group block → Styles → "Callout (yellow box)", or class "mmc-callout" */
.bl-entry .is-style-mmc-callout, .bl-entry .mmc-callout {
  margin: 32px 0; padding: 26px 30px; border: 0; border-radius: 16px; background: #fff4d6;
  font-size: 17px; line-height: 1.6; color: #4a3b0a;
}
.bl-entry .is-style-mmc-callout > :first-child, .bl-entry .mmc-callout > :first-child { margin-top: 0; }
.bl-entry .is-style-mmc-callout > :last-child, .bl-entry .mmc-callout > :last-child { margin-bottom: 0; }
.bl-entry .is-style-mmc-callout p, .bl-entry .mmc-callout p { margin: 0 0 8px; }
.bl-entry .is-style-mmc-callout :is(h2, h3, h4, strong:first-child), .bl-entry .mmc-callout :is(h2, h3, h4) { display: block; margin: 0 0 6px; font-size: 20px; font-weight: 500; letter-spacing: -.01em; color: #2e2300; }
.bl-entry .is-style-mmc-callout cite { color: #7a6420; }

/* author box */
.bl-author {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  margin-top: 72px; padding: 36px; border-radius: 16px; background: #eff2f6;
}
.bl-author .bl-avatar { width: 72px; height: 72px; font-size: 19px; }
.bl-author h2 { margin: 8px 0 0; font-weight: 500; font-size: 21px; letter-spacing: -.01em; }
.bl-author p:not(.bl-side-label) { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--bl-muted); }

/* related posts */
.bl-related { padding: 88px 0 96px; }
.bl-related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.bl-line-label { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 11px; letter-spacing: .2em; color: var(--bl-faint); }
.bl-line-label::before { content: ""; width: 32px; height: 1px; background: #b8a463; }
.bl-related h2 { margin: 16px 0 0; font-weight: 500; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.03em; }
.bl-related .bl-grid { margin-top: 36px; gap: 40px; }
.bl-comments { padding-bottom: 80px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .bl-article { grid-template-columns: 210px minmax(0, 1fr) 120px; gap: 40px; }
}
@media (max-width: 1024px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .bl-featured-body { padding: 36px 32px; }
  .bl-article, .bl-article.no-toc { grid-template-columns: minmax(0, 1fr); gap: 0; width: min(760px, calc(100% - 48px)); margin-top: 56px; }
  .bl-toc { position: static; order: -1; margin-bottom: 40px; padding: 22px 24px; border-radius: 14px; background: #f6f6f4; }
  .bl-toc li + li { margin-top: 10px; }
  .bl-share { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--bl-line); }
  .bl-share .bl-side-label { margin: 0 8px 0 0; }
}
@media (max-width: 800px) {
  .bl-featured { grid-template-columns: 1fr; min-height: 0; }
  .bl-featured-img { aspect-ratio: 16 / 10; }
  .bl-news { padding: 36px 28px; }
  .bl-news-form { flex: 1 1 100%; }
  .bl-author { grid-template-columns: auto minmax(0, 1fr); padding: 28px; }
  .bl-author > .bl-pill { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 700px) {
  .bl-wrap, .bl-article, .bl-article.no-toc { width: calc(100% - 32px); }
  .bl-hero { padding: 56px 0 36px; }
  .bl-post-hero { padding: 40px 0 32px; }
  .bl-lead { font-size: 17px; }
  .bl-filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .bl-filters::-webkit-scrollbar { display: none; }
  .bl-filters a { flex: 0 0 auto; font-size: 15px; }
  .bl-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }
  .bl-featured-body { padding: 28px 22px 30px; }
  .bl-card-body { padding: 24px 20px; }
  .bl-pages { margin-top: 44px; }
  .bl-news { margin-top: 48px; padding: 30px 22px 40px; border-radius: 16px; }
  .bl-news-form { flex-wrap: wrap; }
  .bl-news-form input[type="email"], .bl-news-form button { flex: 1 1 100%; }
  .bl-byline-sep { display: none; }
  .bl-byline .bl-meta { flex-basis: 100%; text-align: center; }
  .bl-cover { aspect-ratio: 4 / 3; border-radius: 12px; }
  .bl-entry { font-size: 17px; }
  .bl-entry h2 { font-size: 25px; margin-top: 36px; }
  .bl-entry .is-style-mmc-callout, .bl-entry .mmc-callout { padding: 22px; }
  .bl-author { grid-template-columns: 1fr; margin-top: 56px; padding: 26px 22px; gap: 16px; }
  .bl-author .bl-avatar { width: 60px; height: 60px; }
  .bl-related { padding: 64px 0 72px; }
  .bl-related .bl-grid { margin-top: 28px; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-card, .bl-card-img img, .bl-featured-img img { transition: none; }
  .bl-card:hover { transform: none; }
}

/* ---------- Comments (only when a post has comments open) ---------- */
.bl { color-scheme: light; }
.bl-comments { max-width: 760px; font-size: 16px; color: var(--bl-text); }
.bl-comments h2, .bl-comments h3 { font-weight: 500; letter-spacing: -.01em; color: var(--bl-ink); }
.bl-comments .comment-list { padding: 0; list-style: none; }
.bl-comments .comment-body { padding: 20px 0; border-bottom: 1px solid var(--bl-line); }
.bl-comments label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--bl-muted); }
.bl-comments input[type="text"], .bl-comments input[type="email"], .bl-comments input[type="url"], .bl-comments textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #dfe1e5; border-radius: 8px; background: #fff; color: var(--bl-ink); font: inherit;
}
.bl-comments textarea:focus, .bl-comments input:focus { outline: none; border-color: var(--bl-ink); }
.bl-comments .comment-form-cookies-consent label { display: inline; }
.bl-comments .submit { padding: 12px 22px; border: 0; border-radius: 8px; background: var(--bl-yellow); color: #1e1e1e; font: 500 16px "DM Sans", sans-serif; cursor: pointer; }
