/* The blog: list pages and the article. Built on the glass theme (theme-base.css / theme-parts.css), so the dark theme follows the tokens.
   The search box and chips come from css/features/search-field.css. */

/* ---------- List pages ---------- */
.bintro { display: flex; flex-direction: column; gap: 12px; }
.btitle { display: flex; align-items: center; gap: 12px; }
.btitle h1 { margin: 0; font-size: 25px; line-height: 1.3; overflow-wrap: anywhere; }
.bintro .g-sub { margin: -4px 0 0; font-size: 16px; }
.bintro .sfield { margin: 0; }
.bcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 calc(12px - var(--g-gap)); font-size: 15px; color: var(--g-muted); }
.bcrumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--g-accent); font-weight: 700; }
.bcrumbs [aria-current] { color: var(--g-muted); }
.blist { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1024px) { .btitle h1 { font-size: 34px; } .bintro .g-sub { font-size: 17px; } }

.bgrid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

/* A post card is a glass tile with its picture inset. */
.bcard { display: flex; flex-direction: column; min-width: 0; padding: 8px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.bcard:hover { background: var(--g-tile-hover); box-shadow: 0 8px 20px rgba(60, 40, 160, .12); }
.bcard-pic { display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--g-icon-bg); }
.bcard-pic img { width: 100%; height: 100%; object-fit: cover; }
.bcard-nopic { display: grid; place-items: center; width: 100%; height: 100%; padding: 16px; text-align: center; font-size: 20px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5b31e1, #3f47e0); }
.bcard-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 8px 6px; flex: 1; }
.bcard-title { margin: 0; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.bcard-title a:hover { color: var(--g-accent); }
.bcard-text { margin: 0; font-size: 16px; line-height: 1.65; color: var(--g-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bcard .bmeta { margin-top: auto; }

/* The featured post: a wide card across the top of the blog home. */
.bfeat .bcard-title { font-size: 23px; }
@media (min-width: 900px) {
  .bfeat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; padding: 10px; }
  .bfeat .bcard-pic { aspect-ratio: auto; min-height: 300px; }
  .bfeat .bcard-body { padding: 22px 24px; justify-content: center; }
  .bfeat .bcard-title { font-size: 28px; }
  .bfeat .bcard-text { -webkit-line-clamp: 4; }
  .bfeat .bmeta { margin-top: 6px; }
}

.bchip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--g-icon-bg); color: var(--g-accent); font-size: 14px; font-weight: 700; }
.bmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 15px; color: var(--g-muted); }

/* ---------- The article ---------- */
/* Staff preview strip: a warning, so it keeps a strong yellow in both themes. */
.bpreview { background: #facc15; color: #1e1b4b; font-size: 16px; padding: 10px 0; }
.bpreview b { margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: #1e1b4b; color: #facc15; }
.bpreview a { text-decoration: underline; font-weight: 700; margin-left: 4px; }

/* One reading column. Its width keeps lines near 70 characters, which is easy on the eyes on a computer too. */
.bcol { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 800px; margin: 0 auto; }
.bcol > .bcrumbs { margin: 0 0 -6px; }
.bsheet { padding: 18px 14px; }
@media (min-width: 768px) { .bsheet { padding: 32px 36px; } }
.bhead { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.bhead h1 { margin: 0; font-size: 27px; line-height: 1.35; overflow-wrap: anywhere; }
@media (min-width: 1024px) { .bhead h1 { font-size: 38px; } }
.bauthor { color: var(--g-text); font-weight: 700; }
.bcover { margin: 0 0 20px; border-radius: var(--g-r-tile); overflow: hidden; background: var(--g-icon-bg); aspect-ratio: 16 / 9; }
.bcover img { width: 100%; height: 100%; object-fit: cover; }

.btoc { margin: 0 0 22px; padding: 4px 16px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.btoc summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--g-text); }
.btoc ol { margin: 0 0 12px; padding-left: 1.4em; display: grid; gap: 6px; font-size: 17px; line-height: 1.5; list-style: none; counter-reset: toc; }
/* Only the main parts (H2) are numbered, so a sub-part (H3) between them does not skip a number. */
.btoc li:not(.sub) { counter-increment: toc; }
.btoc li:not(.sub)::before { content: counter(toc) ". "; margin-left: -1.4em; display: inline-block; min-width: 1.4em; color: var(--g-muted); }
.btoc li.sub { margin-left: .4em; font-size: 16px; }
.btoc li.sub::before { content: "\25E6"; display: inline-block; width: 1em; color: var(--g-muted); }
.btoc a { color: var(--g-accent); }
.btoc a:hover { text-decoration: underline; }

/* The text itself: a little larger and airier than the rest of the site, because it is read for minutes, not glanced at. */
.bbody { font-size: 18px; line-height: 1.9; color: var(--g-text); }
.bbody .rt p { margin: 0 0 1em; }
.bbody .rt h2 { font-size: 1.4em; margin: 1.5em 0 .5em; color: var(--g-text); scroll-margin-top: 90px; }
.bbody .rt h3 { font-size: 1.18em; margin: 1.3em 0 .4em; color: var(--g-text); scroll-margin-top: 90px; }
.bbody .rt ul, .bbody .rt ol { margin: .4em 0 1em; }
.bbody .rt li { margin: .35em 0; }
.bbody .rt a { color: var(--g-accent); }
.bbody .rt blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--g-accent); border-radius: 0 12px 12px 0; background: var(--g-tile); }
.bbody .rt table { margin: 1em 0; font-size: 16px; line-height: 1.6; border-radius: 4px; }
.bbody .rt :is(th, td) { border-color: var(--g-line); }
.bbody .rt th { background: var(--g-icon-bg); }
.bbody img, .bbody iframe, .bbody video { max-width: 100%; height: auto; border-radius: 12px; }
@media (min-width: 1024px) { .bbody { font-size: 19px; } }

.bshare p { margin: 0 0 10px; font-size: 16px; color: var(--g-muted); }
.bshare-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* On a phone the four buttons sit in two even rows instead of three and one. */
@media (max-width: 559px) { .bshare-row { display: grid; grid-template-columns: 1fr 1fr; } .bshare-row > * { justify-content: center; } }
.bshare-row .copybtn, .bshare-btn { min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 700; }
.bshare-row .copybtn { border-color: var(--g-tile-line); background: var(--g-tile); color: var(--g-accent); }
/* Each network keeps its own colour: the colour means "this button opens Facebook / WhatsApp / Messenger". */
.bshare-btn { display: inline-flex; align-items: center; border-radius: 999px; color: #fff; }
.bshare-btn:hover { color: #fff; filter: brightness(1.08); }
.bshare-btn.fb { background: #1877f2; }
.bshare-btn.wa { background: #0e7a4b; }
.bshare-btn.ms { background: #7b3fe4; }

.bcta { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.bcta h2 { margin: 0; font-size: 22px; }
.bcta h2 svg { width: 24px; height: 24px; margin-right: 8px; vertical-align: -4px; color: var(--g-gold); }
.bcta p { margin: 0; max-width: 46ch; font-size: 17px; line-height: 1.7; color: #e3dcff; }

.brelated { width: 100%; }
