/* BuddhaJones Archive Project — shared header, section bar and footer for buddhajones.org, .net and .com.
   Palette: the five logo colours. Each section uses one as its bar colour (--bj-bar) with a darker
   companion for text (--bj-dark). Class names all start with bj- so page styles do not collide. */
:root {
  --bj-ink: #111111; --bj-muted: #5f5f5f; --bj-rule: #e2dcec; --bj-paper: #ffffff; --bj-tint: #f8f6fc;
  --bj-lavender: #b8b0d8; --bj-purple: #c97fd4; --bj-cyan: #40b0e0; --bj-yellow: #e8c800; --bj-green: #6ab830;
  --bj-link-hover: #3b7413;
}
.bj-header, .bj-section, .bj-footer { font-family: system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial, system-ui, sans-serif; color: var(--bj-ink); box-sizing: border-box; line-height: 1.4; text-align: left; }
.bj-header *, .bj-section *, .bj-footer * { box-sizing: border-box; }
.bj-header a, .bj-section a, .bj-footer a { color: inherit; text-decoration: none; }

/* header */
.bj-header { background: var(--bj-paper); border-bottom: 2px solid var(--bj-ink); padding: 18px 40px;
             display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin: 0; }
.bj-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.bj-logo { height: 72px; width: auto; max-width: 160px; display: block; border: 0; margin: 0; }
.bj-logo-sm { height: 48px; max-width: 110px; }
.bj-brand-text { display: flex; flex-direction: column; min-width: 0; }
.bj-name { font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.bj-tag { font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.875rem; letter-spacing: .03em; color: #575757; margin-top: 2px; }
.bj-sites { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.875rem; letter-spacing: .03em; }
.bj-sites a { padding: 2px 0; border-bottom: 2px solid transparent; }
.bj-sites a:hover { color: #326210; border-bottom-color: var(--bj-link-hover); }
.bj-sites a[aria-current] { border-bottom-color: var(--bj-ink); }

/* section bar */
.bj-section { border-top: 5px solid var(--bj-bar, var(--bj-lavender)); background: var(--bj-tint); border-bottom: 1px solid var(--bj-rule);
              padding: 12px 40px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin: 0; }
.bj-section-title { font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.01em;
                    text-transform: none; color: var(--bj-dark, var(--bj-ink)) !important; }
.bj-section-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.875rem; }
.bj-section a:hover { color: #326210 !important; text-decoration: underline; }

/* footer */
.bj-footer { border-top: 2px solid var(--bj-ink); background: var(--bj-paper); margin: 48px 0 0; padding: 0; clear: both; }
.bj-footer-inner { max-width: 1100px; margin: 0 auto; padding: 24px 40px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.bj-footer .bj-name { font-size: 1rem; }
.bj-about { flex-basis: 100%; margin: 6px 0 0; font-size: 0.875rem; line-height: 1.65; color: #575757; max-width: 820px; }
.bj-about strong { color: var(--bj-ink); font-weight: 600; }

@media (max-width: 640px) {
  .bj-header, .bj-section { padding-left: 16px; padding-right: 16px; }
  .bj-footer-inner { padding-left: 16px; padding-right: 16px; }
  .bj-logo { height: 52px; max-width: 110px; }
  .bj-name { font-size: 1.05rem; }
}

/* small-screen fixes for older page layouts that pushed past the screen edge */
@media (max-width: 640px) {
  .post-nav-bar { flex-wrap: wrap; gap: 8px 14px; padding-left: 16px !important; padding-right: 16px !important; }
  .post-nav-bar a, .post-nav-center { white-space: normal !important; }
  .card-arrow { display: none; }
}

/* ===== Shared type scale for page content (all three sites) =====
   Page title 36px · subhead 22px · minor head 18px · article text 17px · other text 16px ·
   byline 16px · meta lines (dates, issues, sources) 12.8px mono · small labels 12px mono.
   Fonts and colours of each collection stay as they are; only sizes are made uniform. */
body.bj-typeset h1, body.bj-typeset .bj-page-title {
  font-size: 2.25rem !important; line-height: 1.2 !important; letter-spacing: -0.01em; }
body.bj-typeset h2:not(.bj-page-title) { font-size: 1.375rem !important; line-height: 1.3 !important; }
body.bj-typeset h3 { font-size: 1.125rem !important; line-height: 1.35 !important; }
body.bj-typeset h4, body.bj-typeset h5, body.bj-typeset h6 { font-size: 0.875rem !important; line-height: 1.4 !important; }

body.bj-typeset p, body.bj-typeset li, body.bj-typeset dd, body.bj-typeset td { font-size: 1rem; line-height: 1.65; }
body.bj-typeset article p, body.bj-typeset article li, body.bj-typeset .text p,
body.bj-typeset .post-content p, body.bj-typeset .entry-content p, body.bj-typeset .chapter p {
  font-size: 1.0625rem !important; line-height: 1.72 !important; }
body.bj-typeset figcaption, body.bj-typeset .caption { font-size: 0.875rem !important; line-height: 1.5 !important; }

/* bylines */
body.bj-typeset .byline, body.bj-typeset .comment-author, body.bj-typeset .collection-byline,
body.bj-typeset .post-author, body.bj-typeset .author { font-size: 1rem !important; line-height: 1.45 !important; }
/* decks / kickers above a title */
body.bj-typeset .kicker, body.bj-typeset .deck, body.bj-typeset .subtitle, body.bj-typeset .dek { font-size: 1rem !important; }

/* meta lines: dates, issue and source lines, counts (and everything inside them) */
body.bj-typeset .publine, body.bj-typeset .publine *,
body.bj-typeset .source, body.bj-typeset .source *,
body.bj-typeset .post-date, body.bj-typeset .post-date *,
body.bj-typeset .post-meta, body.bj-typeset .post-meta *,
body.bj-typeset .intro-meta, body.bj-typeset .intro-meta *,
body.bj-typeset .comment-metadata, body.bj-typeset .comment-metadata *,
body.bj-typeset .meta-line, body.bj-typeset .meta-line *,
body.bj-typeset .section-meta, body.bj-typeset .section-meta *,
body.bj-typeset .issue-date, body.bj-typeset .issue-date *,
body.bj-typeset .results-meta, body.bj-typeset .results-meta *,
body.bj-typeset .pr-author, body.bj-typeset .pr-author *,
body.bj-typeset .lede, body.bj-typeset .lede *,
body.bj-typeset .post-nav-center, body.bj-typeset .post-nav-center *,
body.bj-typeset .date, body.bj-typeset .date *,
body.bj-typeset .home-search p, body.bj-typeset .home-search p * { font-size: 0.875rem !important; line-height: 1.5 !important; }

/* small labels and eyebrows */
body.bj-typeset .card-label, body.bj-typeset .stat-label, body.bj-typeset .section-label, body.bj-typeset .writings-label,
body.bj-typeset .count-label, body.bj-typeset .year-label, body.bj-typeset .search-eyebrow, body.bj-typeset .shrine-label,
body.bj-typeset .overlay-label, body.bj-typeset .snack-section-label, body.bj-typeset .eyebrow, body.bj-typeset .label,
body.bj-typeset .post-cat, body.bj-typeset .tag { font-size: 0.875rem !important; line-height: 1.4 !important; }

@media (max-width: 640px) {
  body.bj-typeset h1, body.bj-typeset .bj-page-title { font-size: 1.75rem !important; }
  body.bj-typeset h2:not(.bj-page-title) { font-size: 1.25rem !important; }
}

/* ===== Readability layer (all three sites) =====
   One reading font, comfortable sizes and strong contrast everywhere. */
body.bj-typeset { font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; color: #111; }
body.bj-typeset :not([lang="ja"]):not(.k):not(code):not(pre) { font-family: inherit; }
body.bj-typeset small { font-size: 0.9375em; }
/* old <font> tags in archived pages: keep emphasis sizes, drop tiny sizes and mixed typefaces */
body.bj-typeset font[size="1"], body.bj-typeset font[size="2"], body.bj-typeset font[size="3"],
body.bj-typeset font[size="-1"], body.bj-typeset font[size="-2"], body.bj-typeset font[size="+0"] { font-size: inherit !important; }
body.bj-typeset font[face] { font-family: inherit !important; }
/* links: always visibly links */
body.bj-typeset main a:not([class]), body.bj-typeset article a:not([class]), body.bj-typeset .text a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }
body.bj-typeset a:focus-visible, body.bj-typeset button:focus-visible { outline: 3px solid #1b6a90; outline-offset: 2px; }

/* breadcrumb trail under the section bar */
.bj-crumbs { font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.9375rem; line-height: 1.5;
             color: #333; padding: 10px 40px; border-bottom: 1px solid var(--bj-rule); background: #fff; display: flex; flex-wrap: wrap;
             align-items: baseline; gap: 2px 8px; margin: 0; text-align: left; }
.bj-crumbs a { color: #1d4f73; text-decoration: underline; text-underline-offset: 2px; }
.bj-crumbs a:hover { color: #111; }
.bj-crumbs [aria-current] { color: #333; }
.bj-crumb-sep { color: #555; }
@media (max-width: 640px) { .bj-crumbs { padding-left: 16px; padding-right: 16px; } }

/* links that no longer work */
.bj-dead { color: inherit; }
.bj-dead-note { display: inline-block; font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; font-size: 0.75rem;
                font-weight: 600; line-height: 1.2; color: #5a1a1a; background: #f6e9e9; border: 1px solid #d9b8b8; border-radius: 3px;
                padding: 1px 5px; vertical-align: 0.1em; white-space: nowrap; text-decoration: none; }
