/* The public blog (pages/blog.html, pages/_blog_card.html, pages/blog_post.html, pages/_blog_side.html).

   The list: a short dark masthead with the search, the categories as round pictures ("stories"), then the posts --
   the newest (or featured) one as a wide row, picture beside its words, the others three to a row, each picture
   16:9. On a phone one to a row. One card's markup does all of it: grid areas place its parts.

   A post: its words in a column of their own; on a wide screen the sidebars either side of it (Blog › Sidebars):
   the right one from 1024px, the left one too from 1280px; narrower, the cards meant for phones come under the
   post. The cover shows whole, whatever its shape: a picture of another shape sits on a blurred copy of itself.
   The post's own words are styled in style.css (.blog-post-content), the same as in the editor. */

.bj { background: var(--bg); }

/* ---------------------------------------------------------------- masthead */
.bj-mast { position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 380px at 88% -20%, rgba(245, 166, 35, .34), transparent 62%),
    radial-gradient(700px 300px at -5% 125%, rgba(228, 99, 42, .28), transparent 60%),
    linear-gradient(160deg, #0F1F3D 0%, #13284f 60%, #0c1a33 100%); }
.bj-mast::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px; }
.bj-mast-in { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 34px 24px 46px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; }
.bj-mast-words { max-width: 620px; }
.bj-kick { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); }
.bj-mast h1 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.01em; }
.bj-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.bj-stat { margin: 8px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.bj-search { position: relative; width: min(340px, 100%); }
.bj-search > i { position: absolute; z-index: 1; left: 17px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .7); font-size: 14px; pointer-events: none; }
.bj-search input { width: 100%; height: 46px; padding: 0 44px 0 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 14.5px; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.bj-search input::placeholder { color: rgba(255, 255, 255, .6); }
.bj-search input:focus { outline: none; background: rgba(255, 255, 255, .16); border-color: var(--coral); }
.bj-search input::-webkit-search-cancel-button { display: none; }
.bj-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); }

/* ---------------------------------------------------------------- the sheet over the masthead, the stories */
.bj-sheet { position: relative; z-index: 2; margin-top: -20px; background: var(--bg); border-radius: 22px 22px 0 0; padding-bottom: 56px; }
.bj-stories { display: flex; gap: 14px; max-width: 1200px; margin: 0 auto; padding: 18px 24px 4px; overflow-x: auto;
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bj-stories::-webkit-scrollbar { display: none; }
.bj-story { flex: none; width: 74px; text-align: center; color: var(--text); text-decoration: none; scroll-snap-align: start; }
.bj-story[hidden] { display: none; }
.bj-ring { display: block; width: 62px; height: 62px; margin: 0 auto 6px; padding: 3px; border-radius: 50%;
  background: conic-gradient(from 200deg, #F5A623, #E4632A, #d4297a, #7b4bd6, #F5A623); transition: transform .2s; }
.bj-ring img, .bj-all { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); object-fit: cover; background: #fff; }
.bj-all { background: linear-gradient(135deg, var(--navy), #24427a); color: #fff; font-size: 20px; }
.bj-saved .bj-all { background: linear-gradient(135deg, #F5A623, #E4632A); }
.bj-story b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj-story:hover .bj-ring { transform: scale(1.05); }
.bj-story.on .bj-ring { background: var(--navy); }
.bj-story.on b { color: var(--navy); font-weight: 800; }

/* ---------------------------------------------------------------- the posts */
.bj-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 16px 24px 8px; align-items: start; }
.bp { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "media media" "body body" "head acts";
  background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(15, 31, 61, .05);
  transition: transform .25s, box-shadow .25s; animation: bp-in .45s ease both; }
.bp:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@keyframes bp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bp-media { grid-area: media; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e9e4da; }
.bp-slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.bp-slides::-webkit-scrollbar { display: none; }
.bp-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.bp-slide img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bp:hover .bp-slide:not(.is-fit) img { transform: scale(1.03); }
/* a picture of another shape (a portrait poster): all of it, on a blurred copy of itself (blog-public.js sets --pic) */
.bp-slide.is-fit, .bj-mini-pic.is-fit { background: #13233f; }
.bp-slide.is-fit::before, .bj-mini-pic.is-fit::before { content: ''; position: absolute; inset: -24px; background: var(--pic) center / cover no-repeat;
  filter: blur(18px) brightness(.85) saturate(1.1); }
.bp-slide.is-fit img, .bj-mini-pic.is-fit img { object-fit: contain; }
.bp-chip, .bp-flag { position: absolute; z-index: 2; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; pointer-events: none; }
.bp-chip { left: 12px; text-transform: uppercase; color: var(--navy); background: rgba(255, 255, 255, .92); backdrop-filter: blur(4px); }
.bp-flag { left: 12px; color: #fff; background: linear-gradient(135deg, #F5A623, #E4632A); }
.bp--hero .bp-chip { display: none; }
.bp-count { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(15, 23, 42, .62); pointer-events: none; }
.bp-dots { position: absolute; z-index: 2; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 5px; pointer-events: none; }
.bp-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background .2s, transform .2s; }
.bp-dots i.on { background: #fff; transform: scale(1.25); }
.bp-arr { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: pointer; opacity: 0; transition: opacity .2s; }
.bp-arr[hidden] { display: none; }
.bp-prev { left: 8px; } .bp-next { right: 8px; }
.bp-media:hover .bp-arr, .bp-arr:focus-visible { opacity: 1; }
.bp-body { grid-area: body; padding: 14px 16px 2px; min-width: 0; }
.bp-title { margin: 0 0 6px; font-family: var(--font-head); font-size: 17.5px; font-weight: 800; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-title a { color: var(--navy); text-decoration: none; background: linear-gradient(var(--coral), var(--coral)) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.bp-title a:hover { background-size: 100% 2px; }
.bp-sum { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-go { display: none; }
.bp-head { grid-area: head; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 4px 12px 16px; }
.bp-av { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--navy), #2c4f8f); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--coral); }
.bp-who { min-width: 0; line-height: 1.3; }
.bp-who b { display: block; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-who small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-who small a { color: var(--coral-dark-text); font-weight: 600; text-decoration: none; }
.bp-acts { grid-area: acts; display: flex; align-items: center; gap: 0; padding: 0 8px 2px 0; align-self: center; }
.bp-acts button, .bj-acts button, .bj-sharebox-acts button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 16px; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.bp-acts button:hover, .bj-acts button:hover { background: var(--coral-light); color: var(--coral-dark-text); }
.bp-acts button:active, .bj-acts button:active, .bj-sharebox-acts button:active { transform: scale(.92); }
[data-act=wa]:hover { color: #128c4b !important; }
.bp-save[aria-pressed="true"] { color: var(--coral-dark) !important; }
.bp-save.is-pop i { animation: bp-pop .45s ease; }
@keyframes bp-pop { 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* the newest (or featured) story: one wide row, its picture beside its words */
.bj-feed.has-hero .bp--hero { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto; grid-template-areas: "media body body" "media head acts"; }
.bp--hero .bp-media { aspect-ratio: 16 / 9; }
.bp--hero .bp-body { align-self: center; padding: 26px 30px 6px; }
.bp--hero .bp-title { font-size: clamp(21px, 2.1vw, 28px); line-height: 1.22; -webkit-line-clamp: 3; margin-bottom: 10px; }
.bp--hero .bp-sum { font-size: 15px; -webkit-line-clamp: 3; }
.bp--hero .bp-go { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--coral-dark-text); text-decoration: none; }
.bp--hero .bp-go:hover i { transform: translateX(3px); }
.bp--hero .bp-go i { transition: transform .2s; }
.bp--hero .bp-head { padding: 10px 4px 18px 30px; }
.bp--hero .bp-acts { padding-bottom: 8px; padding-right: 14px; }

/* the end of the list */
.bj-end { display: flex; justify-content: center; padding: 28px 24px 0; }
.bj-more { display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 8px 22px rgba(15, 31, 61, .18); }
.bj-more.is-busy::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: bj-spin .8s linear infinite; }
@keyframes bj-spin { to { transform: rotate(360deg); } }
.bj-done { margin: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.bj-done i { font-size: 20px; color: var(--gold); }
.bj-empty { max-width: 460px; margin: 30px auto 0; padding: 40px 24px; text-align: center; }
.bj-empty > span { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--coral-light); color: var(--coral-dark); font-size: 28px; margin-bottom: 16px; }
.bj-empty h2 { font-family: var(--font-head); font-size: 22px; color: var(--navy); margin: 0 0 8px; }
.bj-empty p { color: var(--muted); margin: 0; }
.bj-toast { position: fixed; z-index: 1000; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 11px 18px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.bj-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- a tablet: two to a row */
@media (max-width: 1023px) {
  .bj-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .bp--hero .bp-body { padding: 20px 22px 4px; }
  .bp--hero .bp-head { padding-left: 22px; }
}
@media (max-width: 760px) {
  .bj-feed.has-hero .bp--hero { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; grid-template-areas: "media media" "body body" "head acts"; }
  .bp--hero .bp-body { padding: 14px 16px 2px; }
  .bp--hero .bp-title { font-size: 19px; -webkit-line-clamp: 2; }
  .bp--hero .bp-sum { font-size: 13.5px; -webkit-line-clamp: 2; }
  .bp--hero .bp-go { display: none; }
  .bp--hero .bp-head { padding: 10px 4px 12px 16px; }
  .bp--hero .bp-acts { padding: 0 8px 2px 0; }
}

/* ---------------------------------------------------------------- a phone: one to a row */
@media (max-width: 640px) {
  .bj-mast-in { padding: 22px 16px 38px; gap: 14px; }
  .bj-mast h1 { font-size: 27px; }
  .bj-sub { font-size: 14px; margin-top: 6px; }
  .bj-stat { display: none; }
  .bj-search { width: 100%; }
  .bj-search input { height: 44px; }
  .bj-sheet { margin-top: -18px; border-radius: 18px 18px 0 0; padding-bottom: 30px; }
  .bj-stories { gap: 10px; padding: 14px 14px 8px; }
  .bj-story { width: 64px; }
  .bj-ring { width: 56px; height: 56px; }
  .bj-story b { font-size: 11px; }
  .bj-feed, .bj-feed.has-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 10px 12px 0; }
  .bp { border-radius: 14px; }
  .bp:hover { transform: none; box-shadow: 0 2px 10px rgba(15, 31, 61, .05); }
  .bp-arr { display: none; }
  .bp-acts button { width: 40px; height: 40px; font-size: 17px; }
  .bj-end { padding-top: 22px; }
}

/* ---------------------------------------------------------------- one post */
.bj-progress { position: fixed; z-index: 1100; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.bj-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #F5A623, #E4632A); }
.bj-shell { --rl: 260px; --rr: 300px; --main: 760px; display: grid; grid-template-columns: minmax(0, var(--main)); justify-content: center;
  column-gap: 44px; max-width: 1480px; margin: 0 auto; padding: 0 24px; background: #fff; }
.bj-shell.is-wide { --main: 980px; }
.bj-shell.is-narrow { --main: 660px; }
.bj-post { min-width: 0; padding: 34px 0 60px; background: #fff; }
.bj-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13.5px; font-weight: 600; }
.bj-crumbs a { color: var(--coral-dark-text); text-decoration: none; }
.bj-crumbs span { color: var(--border); }
.bj-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.bj-cats a { padding: 4px 11px; border-radius: 999px; background: var(--coral-light); color: var(--coral-dark-text); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.bj-post h1 { margin: 0; font-family: var(--font-head); font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.14; color: var(--navy); letter-spacing: -.01em; }
.bj-dek { margin: 14px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.bj-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bj-by { min-width: 0; line-height: 1.35; }
.bj-by b { display: block; font-size: 14.5px; }
.bj-by small { color: var(--muted); font-size: 13px; }
.bj-acts { margin-left: auto; display: flex; gap: 2px; }
.bj-acts button { width: 38px; height: 38px; font-size: 17px; }

/* the cover: all of it, whatever its shape -- a landscape 1200 x 630 fills the frame; anything else sits on a
   blurred copy of itself; a portrait one gets a taller frame (is-tall, blog-public.js) */
.bj-cover { position: relative; isolation: isolate; margin: 24px 0 0; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: 18px; background: #e9eef5; }
.bj-cover.is-tall { aspect-ratio: 4 / 3; }
.bj-cover-bg { position: absolute; z-index: -1; top: -40px; left: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover;
  filter: blur(30px) saturate(1.15); opacity: .7; }
.bj-cover-img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 1100px) {   /* no sidebars: the cover a little wider than the words, the way a magazine sets it */
  .bj-shell:not(.has-left):not(.has-right) .bj-cover { margin-left: -90px; margin-right: -90px; }
}

.bj-content { padding: 30px 0 6px; font-size: 17.5px; line-height: 1.85; }
.bj-tags { margin: 0; padding: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bj-tags a { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: #f4f1ea; color: var(--navy); font-weight: 600; text-decoration: none; }
.bj-tags a:hover { background: #ece6da; }

/* "Found this useful?" */
.bj-sharebox { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px 18px; margin: 38px 0 0; padding: 22px 24px;
  border-radius: 18px; background: linear-gradient(135deg, #fff6e6 0%, #fffdf8 75%); border: 1px solid #f1e2c4; }
.bj-sharebox-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--coral-dark); font-size: 20px; box-shadow: 0 4px 14px rgba(232, 150, 26, .18); }
.bj-sharebox-words { min-width: 0; }
.bj-sharebox-words b { display: block; margin-bottom: 3px; font-family: var(--font-head); font-size: 18px; color: var(--navy); }
.bj-sharebox-words span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.bj-sharebox-acts { display: flex; align-items: center; gap: 8px; }
.bj-sharebox-acts button:not(.bj-wa) { width: 42px; height: 42px; background: #fff; border: 1px solid var(--border); color: var(--navy); font-size: 16px; }
.bj-sharebox-acts button:not(.bj-wa):hover { border-color: var(--coral); color: var(--coral-dark-text); }
.bj-sharebox-acts .bj-wa { width: auto; height: 42px; padding: 0 18px; border-radius: 999px; background: #25d366; color: #fff; font-size: 14.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 16px rgba(37, 211, 102, .28); white-space: nowrap; }
.bj-sharebox-acts .bj-wa:hover { background: #1ebe5a; color: #fff !important; }
.bj-sharebox-acts .bj-wa i { font-size: 17px; }

/* ---------------------------------------------------------------- the sidebars beside a post */
.bj-rail { display: none; grid-row: 1; min-width: 0; padding: 34px 0 60px; flex-direction: column; gap: 18px; }
.bj-rail.is-sticky:not(.no-stick) > :last-child { position: sticky; top: 88px; }   /* no-stick: taller than the screen */
.bj-below { display: none; margin-top: 34px; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; }
@media (min-width: 1024px) {
  .bj-rail.is-right { display: flex; grid-column: 2; }
  .bj-shell.has-right { grid-template-columns: minmax(0, var(--main)) var(--rr); }
  .bj-shell.has-right .bj-post { grid-column: 1; grid-row: 1; }
  /* the left sidebar's cards come under the post until it has room of its own */
  .bj-shell.has-left .bj-below:has(.is-left) { display: grid; }
  .bj-below-i.is-right { display: none; }
  /* a block as wide as the screen would run under the sidebars: as wide as the words instead */
  .bj-shell.has-right .bj-content .wd-full, .bj-shell.has-right .bj-content .wd-wide { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
  .bj-shell.has-right .bj-content figure.wd-full img { border-radius: 14px; }
}
@media (min-width: 1280px) {
  .bj-rail.is-left { display: flex; grid-column: 1; }
  .bj-shell.has-left { grid-template-columns: var(--rl) minmax(0, var(--main)); }
  .bj-shell.has-left .bj-post { grid-column: 2; grid-row: 1; }
  .bj-shell.has-left.has-right { grid-template-columns: var(--rl) minmax(0, var(--main)) var(--rr); }
  .bj-shell.has-left.has-right .bj-rail.is-right { grid-column: 3; }
  .bj-shell.has-left .bj-below { display: none !important; }
  .bj-shell.has-left .bj-content .wd-full, .bj-shell.has-left .bj-content .wd-wide { width: auto; max-width: 100%; margin-left: 0; margin-right: 0; }
  .bj-shell.has-left .bj-content figure.wd-full img { border-radius: 14px; }
}
@media (max-width: 1023px) {
  .bj-below { display: grid; }
}

/* one card (pages/_blog_side.html): its colours (th-*), a height of its own (--h), how its picture fits */
.bsd { position: relative; min-width: 0; border-radius: 16px; overflow: hidden; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.bsd.has-h { height: var(--h); display: flex; flex-direction: column; }
.bsd-in { padding: 16px 18px 18px; min-width: 0; }
.bsd.has-h .bsd-in { flex: 1 1 auto; min-height: 0; overflow: auto; }
.bsd.has-h.bsd--ad .bsd-in { flex: 0 0 auto; overflow: visible; }
.bsd-h { margin: 0 0 10px; font-family: var(--font-head); font-size: 16.5px; font-weight: 800; color: var(--navy); line-height: 1.3; }
.bsd-p { margin: 0 0 12px; color: var(--muted); font-size: 14px; white-space: pre-line; }
.bsd-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--coral); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 6px 16px rgba(245, 166, 35, .28); }
.bsd-btn:hover { background: var(--coral-dark); color: #fff; }
.bsd-btn i { font-size: 12px; transition: transform .2s; }
.bsd-btn:hover i { transform: translateX(3px); }
.bsd-pic { position: relative; display: block; background: #eef1f5; overflow: hidden; }
.bsd-pic img { display: block; width: 100%; height: auto; transition: transform .5s ease; }
a.bsd-pic:hover img { transform: scale(1.02); }
.bsd.has-h .bsd-pic { flex: 1 1 auto; min-height: 0; }
.bsd.has-h .bsd-pic img { height: 100%; object-fit: contain; }
.bsd.has-h.fit-fill .bsd-pic img { object-fit: cover; }
.bsd-cap { margin: 8px 4px 0; font-size: 13px; color: var(--muted); text-align: center; }
.bsd--flyer .bsd-cap { flex: none; }
.bsd-dim { color: var(--muted); font-size: 13px; }
/* links */
.bsd-links { list-style: none; margin: 0; padding: 0; }
.bsd-links li + li { border-top: 1px solid rgba(15, 31, 61, .08); }
.bsd-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; color: var(--navy); font-weight: 600; font-size: 14px; text-decoration: none; }
.bsd-links a i { font-size: 10px; opacity: .45; transition: transform .2s; }
.bsd-links a:hover { color: var(--coral-dark-text); }
.bsd-links a:hover i { transform: translateX(3px); opacity: .9; }
/* on this page */
.bsd-toc { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.bsd-toc li a { display: block; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--muted); font-size: 13.5px; line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.bsd-toc li.is-sub a { padding-left: 26px; font-size: 13px; }
.bsd-toc li a:hover { color: var(--navy); }
.bsd-toc li a.on { color: var(--navy); font-weight: 700; border-left-color: var(--coral); }
.bsd--contents[hidden] { display: none; }
/* more stories */
.bsd-more { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bsd-more a { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.bsd-more img { width: 68px; height: 48px; object-fit: cover; border-radius: 8px; background: #e9e4da; }
.bsd-more b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.35; color: var(--navy); }
.bsd-more em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--muted); }
.bsd-more a:hover b { color: var(--coral-dark-text); }
/* a reusable block, smaller than in a post */
.bsd-block.blog-post-content { font-size: 14.5px; line-height: 1.6; }
.bsd-block.blog-post-content h2 { font-size: 18px; margin: 0 0 8px; }
.bsd-block.blog-post-content h3 { font-size: 16px; margin: 12px 0 6px; }
.bsd-block.blog-post-content > :last-child { margin-bottom: 0; }
/* the colours */
.bsd.th-card { background: #fff; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(15, 31, 61, .04); }
.bsd.th-plain { border-radius: 0; overflow: visible; }
.bsd.th-plain .bsd-in { padding: 4px 2px 6px; }
.bsd.th-plain .bsd-pic { border-radius: 14px; }
.bsd.th-plain.has-h { overflow: hidden; }
.bsd.th-soft { background: #fbf5ea; border: 1px solid #f0e3c9; }
.bsd.th-blue { background: #eef5fe; border: 1px solid #d6e6fb; }
.bsd.th-green { background: #ebf8f0; border: 1px solid #c8ead5; }
.bsd.th-green .bsd-h { color: #0b5b33; }
.bsd.th-green .bsd-btn { background: #128c4b; box-shadow: 0 6px 16px rgba(18, 140, 75, .25); }
.bsd.th-navy { background: linear-gradient(160deg, #0F1F3D, #1d3a6e); color: #fff; }
.bsd.th-coral { background: linear-gradient(150deg, #F5A623, #E4632A); color: #fff; }
.bsd.th-navy .bsd-h, .bsd.th-coral .bsd-h, .bsd.th-navy .bsd-links a, .bsd.th-coral .bsd-links a, .bsd.th-navy .bsd-more b, .bsd.th-coral .bsd-more b,
.bsd.th-navy .bsd-toc li a.on, .bsd.th-coral .bsd-toc li a.on { color: #fff; }
.bsd.th-navy .bsd-p, .bsd.th-navy .bsd-more em, .bsd.th-navy .bsd-toc li a, .bsd.th-navy .bsd-cap { color: rgba(255, 255, 255, .75); }
.bsd.th-coral .bsd-p, .bsd.th-coral .bsd-more em, .bsd.th-coral .bsd-toc li a, .bsd.th-coral .bsd-cap { color: rgba(255, 255, 255, .9); }
.bsd.th-navy .bsd-links li + li, .bsd.th-coral .bsd-links li + li { border-top-color: rgba(255, 255, 255, .18); }
.bsd.th-coral .bsd-btn { background: #fff; color: #b0461a; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.bsd.th-navy .bsd-pic, .bsd.th-coral .bsd-pic { background: rgba(255, 255, 255, .08); }

/* what to read next */
.bj-next { background: var(--bg); border-top: 1px solid var(--border); }
.bj-next > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.bj-next { padding: 40px 24px 60px; }
.bj-next h2 { margin-top: 0; margin-bottom: 16px; font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--navy); }
.bj-next-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bj-mini { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.bj-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bj-mini-pic { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e9e4da; }
.bj-mini-pic img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.bj-mini-words { display: flex; flex-direction: column; gap: 5px; padding: 13px 16px 16px; }
.bj-mini small { color: var(--coral-dark-text); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.bj-mini b { color: var(--navy); font-size: 15.5px; line-height: 1.35; }
.bj-mini em { color: var(--muted); font-size: 12.5px; font-style: normal; }

@media (max-width: 640px) {
  .bj-shell { padding: 0 16px; }
  .bj-post { padding: 20px 0 40px; }
  .bj-crumbs { margin-bottom: 12px; }
  .bj-dek { font-size: 16px; }
  .bj-byline { flex-wrap: wrap; }
  .bj-cover, .bj-cover.is-tall { margin: 16px -16px 0; border-radius: 0; aspect-ratio: auto; }
  .bj-cover-img { height: auto; max-height: 78vh; }
  .bj-content { padding: 22px 0 4px; font-size: 16.5px; }
  .bj-below { margin-top: 26px; }
  .bj-sharebox { grid-template-columns: auto minmax(0, 1fr); margin-top: 28px; padding: 18px; gap: 14px; }
  .bj-sharebox-acts { grid-column: 1 / -1; }
  .bj-sharebox-acts .bj-wa { flex: 1; justify-content: center; }
  .bj-next { padding: 30px 0 40px; }
  .bj-next h2 { padding: 0 16px; font-size: 21px; }
  .bj-next-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .bj-next-row::-webkit-scrollbar { display: none; }
  .bj-mini { flex: 0 0 78%; scroll-snap-align: center; }
}

/* a heading "On this page" jumps to lands below the site's bar, not under it */
.bj-content h2, .bj-content h3 { scroll-margin-top: 90px; }
