/*
 * Blog article page (blog-detail.php).
 *
 * Self-contained on purpose: the compiled Tailwind build is missing many
 * utilities (size-10, w-16, arbitrary colours…), which is what left the old
 * page with invisible share buttons and oversized sidebar thumbnails.
 */

.ba, .ba-more {
	--ba-ink: #10201f;
	--ba-text: #33413f;
	--ba-muted: #6b7a78;
	--ba-line: #e3eceb;
	--ba-tint: #eef7f6;
	--ba-teal: #066168;
	--ba-teal-dark: #054f55;
	--ba-gold: #FFAA0D;
	--ba-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	color: var(--ba-text);
}

/* The site body is pale aqua; long-form reading sits on white. */
.ba { background: #fff; }

.ba-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ba-wrap--narrow { max-width: 820px; }

/* Reading progress — fixed, so it lives outside #smooth-content. */
.ba-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100000; pointer-events: none; }
.ba-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ba-teal, #066168), #FFAA0D); transition: width .1s linear; }

/* ── Article header ─────────────────────────────────────────── */
/* Top padding clears the floating site header (it is absolutely positioned). */
.ba-hero { background: linear-gradient(180deg, #e4f3f1 0%, var(--ba-tint) 100%); padding: 176px 0 128px; text-align: center; }
@media (min-width: 1024px) { .ba-hero { padding-top: 212px; } }

.ba-crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: .8rem; color: var(--ba-muted); margin-bottom: 22px; }
.ba-crumbs a { color: var(--ba-muted); transition: color .2s; }
.ba-crumbs a:hover { color: var(--ba-teal); }
.ba-crumbs [aria-current] { color: var(--ba-ink); font-weight: 600; }

.ba-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--ba-teal); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 2px 10px rgba(6, 97, 104, .08); transition: background .2s, color .2s; }
.ba-chip:hover { background: var(--ba-teal); color: #fff; }

.ba-title { font-family: var(--ba-serif); font-weight: 600; color: var(--ba-ink); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.12; letter-spacing: -.01em; margin: 18px auto 18px; max-width: 18em; text-wrap: balance; }
.ba-dek { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--ba-muted); max-width: 40em; margin: 0 auto 30px; }

.ba-meta { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.ba-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ba-teal); color: #fff; font-weight: 700; font-size: 1.05rem; }
.ba-author { display: block; font-weight: 700; color: var(--ba-ink); font-size: .95rem; }
.ba-sub { display: block; font-size: .85rem; color: var(--ba-muted); }

/* ── Cover image, overlapping the header band ──────────────────── */
.ba-cover { margin: -88px auto 0; }
.ba-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 60px rgba(6, 50, 54, .18); background: var(--ba-tint); }
@media (min-width: 1024px) { .ba-cover img { aspect-ratio: 21 / 9; } }

/* ── Body + sidebar ─────────────────────────────────────────── */
.ba-layout { display: grid; gap: 56px; padding-top: 56px; padding-bottom: 72px; }
@media (min-width: 1024px) { .ba-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 72px; } }
.ba-main { min-width: 0; max-width: 720px; }

/* Article typography. Admin-authored HTML lands here. */
.ba-body { font-size: 1.125rem; line-height: 1.85; color: var(--ba-text); overflow-wrap: break-word; }
.ba-body > :first-child { margin-top: 0; }
.ba-body > p:first-child { font-size: 1.22rem; line-height: 1.75; color: var(--ba-ink); }
.ba-body p { margin: 0 0 1.4em; }
.ba-body h2, .ba-body h3, .ba-body h4 { font-family: var(--ba-serif); color: var(--ba-ink); line-height: 1.25; scroll-margin-top: 120px; }
.ba-body h2 { font-size: 1.85rem; font-weight: 600; margin: 2.1em 0 .6em; }
.ba-body h3 { font-size: 1.4rem; font-weight: 600; margin: 1.8em 0 .5em; }
.ba-body h4 { font-size: 1.15rem; font-weight: 700; margin: 1.5em 0 .4em; }
.ba-body strong, .ba-body b { color: var(--ba-ink); font-weight: 700; }
.ba-body a { color: var(--ba-teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ba-body a:hover { color: var(--ba-teal-dark); text-decoration-thickness: 2px; }
.ba-body ul, .ba-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.ba-body ul { list-style: disc; }
.ba-body ol { list-style: decimal; }
.ba-body li { margin: 0 0 .5em; padding-left: .2em; }
.ba-body li::marker { color: var(--ba-teal); }
.ba-body blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--ba-gold); font-family: var(--ba-serif); font-style: italic; font-size: 1.35rem; line-height: 1.55; color: var(--ba-ink); }
.ba-body img { max-width: 100%; height: auto; border-radius: 16px; margin: 1.8em 0; }
.ba-body figure { margin: 2em 0; }
.ba-body figcaption { font-size: .85rem; color: var(--ba-muted); text-align: center; margin-top: -.8em; }
.ba-body hr { border: 0; border-top: 1px solid var(--ba-line); margin: 2.5em 0; }
.ba-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 1rem; display: block; overflow-x: auto; }
.ba-body th, .ba-body td { border-bottom: 1px solid var(--ba-line); padding: 10px 12px; text-align: left; }
.ba-body th { color: var(--ba-ink); font-weight: 700; }

/* Tags, share, author */
.ba-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.ba-tag { padding: 6px 14px; border-radius: 999px; background: var(--ba-tint); color: var(--ba-teal); font-size: .8rem; font-weight: 600; }

.ba-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; padding: 22px 0; border-top: 1px solid var(--ba-line); border-bottom: 1px solid var(--ba-line); }
.ba-share-label { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ba-muted); margin-right: 6px; }
.ba-share a, .ba-share button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--ba-line); background: #fff; color: var(--ba-ink); font-size: .95rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.ba-share a:hover, .ba-share button:hover { background: var(--ba-teal); border-color: var(--ba-teal); color: #fff; transform: translateY(-2px); }
.ba-share button.is-copied { background: var(--ba-teal); border-color: var(--ba-teal); color: #fff; }
.ba-share-note { font-size: .8rem; color: var(--ba-teal); font-weight: 600; min-width: 4em; }
.ba-share a:focus-visible, .ba-share button:focus-visible, .ba-card:focus-visible { outline: 2px solid var(--ba-gold); outline-offset: 3px; }

.ba-authorbox { display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; padding: 26px; border-radius: 18px; background: var(--ba-tint); }
.ba-authorbox .ba-avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.ba-authorbox-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ba-muted); }
.ba-authorbox-name { font-family: var(--ba-serif); font-size: 1.3rem; font-weight: 600; color: var(--ba-ink); margin: 2px 0 6px; }
.ba-authorbox p { margin: 0; font-size: .95rem; line-height: 1.65; }

/* Sidebar */
.ba-aside { display: grid; gap: 24px; align-content: start; }
.ba-panel { border: 1px solid var(--ba-line); border-radius: 18px; padding: 24px; background: #fff; }
.ba-panel-title { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ba-muted); margin: 0 0 14px; }
/* Below desktop the sidebar follows the article, where a contents list is no use. */
@media (max-width: 1023px) { .ba-toc-panel { display: none; } }
.ba-toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ba-toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--ba-line); color: var(--ba-text); font-size: .92rem; line-height: 1.4; transition: color .2s, border-color .2s; }
.ba-toc a:hover { color: var(--ba-teal); border-color: var(--ba-teal); }
.ba-toc .is-sub a { padding-left: 28px; font-size: .86rem; color: var(--ba-muted); }
.ba-cats { list-style: none; margin: 0; padding: 0; }
.ba-cats a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ba-line); color: var(--ba-text); font-size: .95rem; transition: color .2s; }
.ba-cats li:last-child a { border-bottom: 0; }
.ba-cats a:hover, .ba-cats a[aria-current] { color: var(--ba-teal); font-weight: 600; }
.ba-cats span { font-size: .78rem; color: var(--ba-muted); background: var(--ba-tint); border-radius: 999px; padding: 2px 9px; }

.ba-cta { border-radius: 18px; padding: 28px 24px; color: #fff; background: linear-gradient(160deg, #077a82 0%, var(--ba-teal) 55%, #04454a 100%); }
.ba-cta-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #FFD214; }
.ba-cta h3 { font-family: var(--ba-serif); font-size: 1.45rem; font-weight: 600; line-height: 1.25; color: #fff; margin: 8px 0 10px; }
.ba-cta p { font-size: .92rem; line-height: 1.6; color: rgba(255, 255, 255, .82); margin: 0 0 20px; }
.ba-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: #FFD214; color: #10201f; font-weight: 700; font-size: .9rem; transition: background .2s, transform .2s; }
.ba-cta a:hover { background: #fff; transform: translateY(-1px); }

/* ── Keep reading ───────────────────────────────────────────── */
.ba-more { background: var(--ba-tint); padding: 72px 0 96px; }
.ba-more-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.ba-more-head h2 { font-family: var(--ba-serif); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; color: var(--ba-ink); margin: 0; }
.ba-more-head a { font-weight: 700; color: var(--ba-teal); font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.ba-more-head a:hover { color: var(--ba-teal-dark); }
.ba-grid { display: grid; gap: 24px; }
@media (min-width: 700px) { .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.ba-card { display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 28px rgba(6, 97, 104, .08); transition: transform .3s, box-shadow .3s; color: inherit; }
.ba-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(6, 97, 104, .14); }
.ba-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ba-tint); }
.ba-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ba-card:hover .ba-card-img img { transform: scale(1.04); }
.ba-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; flex: 1; }
.ba-card-cat { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ba-teal); }
.ba-card-title { font-family: var(--ba-serif); font-size: 1.2rem; font-weight: 600; line-height: 1.3; color: var(--ba-ink); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ba-card-text { font-size: .92rem; line-height: 1.6; color: var(--ba-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ba-card-meta { margin-top: auto; padding-top: 8px; font-size: .8rem; color: var(--ba-muted); }

@media (max-width: 639px) {
	.ba-hero { padding-bottom: 96px; }
	.ba-cover { margin-top: -64px; }
	.ba-cover img { aspect-ratio: 4 / 3; border-radius: 16px; }
	.ba-body { font-size: 1.06rem; }
	.ba-body > p:first-child { font-size: 1.12rem; }
	.ba-authorbox { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	.ba-card, .ba-card-img img, .ba-share a, .ba-share button { transition: none; }
}

/* ══════════════════════════════════════════════════════════════
   Blog list (blog.php) and the homepage "From the journal" section.
   Shares the article page's tokens and .ba-card cards.
   ══════════════════════════════════════════════════════════════ */
.bl, .hj { --ba-ink: #10201f; --ba-text: #33413f; --ba-muted: #6b7a78; --ba-line: #e3eceb; --ba-tint: #eef7f6; --ba-teal: #066168; --ba-teal-dark: #054f55; --ba-gold: #FFAA0D; --ba-serif: 'Playfair Display', Georgia, 'Times New Roman', serif; color: var(--ba-text); }
.bl-hero { background: linear-gradient(180deg, #e4f3f1 0%, var(--ba-tint) 100%); padding: 176px 0 56px; text-align: center; }
@media (min-width: 1024px) { .bl-hero { padding-top: 212px; } }
.bl-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ba-teal); }
.bl-title { font-family: var(--ba-serif); font-weight: 600; color: var(--ba-ink); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: 12px 0 14px; }
.bl-intro { max-width: 36em; margin: 0 auto 28px; font-size: 1.08rem; line-height: 1.65; color: var(--ba-muted); }
.bl-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bl-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--ba-line); color: var(--ba-text); font-size: .88rem; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.bl-filter span { font-size: .75rem; color: var(--ba-muted); background: var(--ba-tint); border-radius: 999px; padding: 1px 8px; }
.bl-filter:hover { border-color: var(--ba-teal); color: var(--ba-teal); }
.bl-filter[aria-current] { background: var(--ba-teal); border-color: var(--ba-teal); color: #fff; }
.bl-filter[aria-current] span { background: rgba(255, 255, 255, .2); color: #fff; }

.bl-body { background: var(--ba-tint); padding: 8px 0 96px; }

/* Lead story */
.bl-lead { display: grid; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 16px 44px rgba(6, 97, 104, .1); margin-bottom: 40px; color: inherit; transition: box-shadow .3s; }
.bl-lead:hover { box-shadow: 0 24px 56px rgba(6, 97, 104, .16); }
@media (min-width: 900px) { .bl-lead { grid-template-columns: 1.25fr 1fr; } }
.bl-lead-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ba-tint); }
@media (min-width: 900px) { .bl-lead-img { aspect-ratio: auto; min-height: 380px; } }
.bl-lead-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.bl-lead:hover .bl-lead-img img { transform: scale(1.03); }
.bl-lead-body { padding: 32px 32px 36px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
@media (min-width: 1100px) { .bl-lead-body { padding: 44px 48px; } }
.bl-lead-tag { display: inline-flex; gap: 10px; align-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ba-teal); }
.bl-lead-tag b { color: #fff; background: var(--ba-gold); padding: 3px 9px; border-radius: 999px; letter-spacing: .1em; }
.bl-lead-title { font-family: var(--ba-serif); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.2; color: var(--ba-ink); margin: 0; }
.bl-lead-text { font-size: 1.02rem; line-height: 1.7; color: var(--ba-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bl-lead-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: .88rem; color: var(--ba-muted); }
.bl-lead-meta .ba-avatar { width: 38px; height: 38px; font-size: .95rem; }
.bl-lead-meta strong { display: block; color: var(--ba-ink); }
.bl-read { margin-top: 6px; font-weight: 700; color: var(--ba-teal); display: inline-flex; gap: 8px; align-items: center; }

.bl-section-title { font-family: var(--ba-serif); font-weight: 600; font-size: 1.6rem; color: var(--ba-ink); margin: 0 0 22px; }

/* Pagination */
.bl-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.bl-pages a, .bl-pages span { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: .92rem; background: #fff; color: var(--ba-ink); border: 1px solid var(--ba-line); transition: background .2s, color .2s, border-color .2s; }
.bl-pages a:hover { border-color: var(--ba-teal); color: var(--ba-teal); }
.bl-pages [aria-current] { background: var(--ba-teal); color: #fff; border-color: var(--ba-teal); }
.bl-pages .is-gap { border: 0; background: transparent; min-width: 20px; padding: 0; }

.bl-empty { text-align: center; padding: 56px 24px; background: #fff; border-radius: 22px; }
.bl-empty i { font-size: 2.4rem; color: var(--ba-teal); opacity: .4; }
.bl-empty h2 { font-family: var(--ba-serif); color: var(--ba-ink); font-size: 1.6rem; margin: 16px 0 8px; }
.bl-empty p { color: var(--ba-muted); margin: 0 0 20px; }
.bl-empty a { display: inline-flex; padding: 11px 22px; border-radius: 999px; background: var(--ba-teal); color: #fff; font-weight: 700; }

/* Homepage section */
.hj { padding: 88px 0 96px; background: var(--ba-tint, #eef7f6); }
.hj-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.hj-head h2 { font-family: var(--ba-serif); font-weight: 600; color: var(--ba-ink); font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.15; margin: 6px 0 0; }
.hj-head p { color: var(--ba-muted); margin: 8px 0 0; max-width: 34em; }
.hj-head a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--ba-teal); color: #fff; font-weight: 700; font-size: .92rem; transition: background .2s; }
.hj-head a:hover { background: var(--ba-teal-dark); }
