/*
 * legacy.css: shared stylesheet for the modernised GoScript-era sections of
 * canadianchristianity.com (static pages built by tools/sitebuild/build.py).
 *
 * - One stylesheet for both template families. The blue family (Prairies,
 *   Ontario) and the red family (National, BCCN) share the layout grid, the
 *   typography, the ad-slot style and the article rules, and differ mainly in
 *   the custom properties set by .theme-blue / .theme-red.
 * - Flexible, relative CSS (rem/em, fr, minmax). Fixed px only where they
 *   describe an image or ad asset (wordmark, map, nav-bar image, ad slots).
 * - Desktop only for now (no responsive rules), like 2007.
 * - Region map and measurements: reports/modernise/prairies-layout-analysis.md
 *   in the cc-modernization project folder.
 */

/* ------------------------------------------------------------------ */
/* 1. Custom properties                                                */
/* ------------------------------------------------------------------ */
:root {
  /* typography */
  --font-body: Arial, Helvetica, sans-serif;
  --fs-base: 1rem;            /* 16px, as <font face> on a medium cell */
  --fs-small: .8125rem;       /* 13px, <font size=-1> */
  --fs-xsmall: .625rem;       /* 10px, <font size=-2> */
  --lh-base: normal;
  --text: #000;
  --accent: #990000;          /* headlines, the red link text of 2007 */

  /* Template links (masthead, sidebar, footer): red text as in 2007.
     Modern default: matching red underline and a subtle hover. */
  --link-2007: #0000ee;       /* the 2007 underline colour (default LINK, <font color> inside <a>) */
  --link-color: var(--accent);
  --link-underline: var(--accent);
  --link-visited: var(--accent);
  --link-visited-underline: var(--link-visited);
  --link-hover-underline: currentColor;
  --link-hover-thickness: 2px;

  /* In-content links (inside <article>): browser blue as in 2007. */
  --content-link-color: #0000ee;
  --content-link-underline: currentColor;
  --content-link-visited: #551a8b;   /* browser default visited purple */
  --content-link-visited-underline: currentColor;

  /* The whole 2007 look is one switch: class="look-2007" on <body> (section 1b). */

  /* article column. Modern default: a readable capped column.
     2007 look: --article-max: none (fully fluid, ~808px at 1024px). */
  --article-max: 45rem;

  /* frame and chrome (overridden per theme) */
  --page-bg: #fff;
  --frame-bg: #fff;
  --gutter: 0px;
  --chrome-bg: #fff;
  --nav-bg: transparent;
  --nav-fg: #fff;
  --content-bg: #fff;
  --content-pad: .5rem;
  --heading-listing: #000;
  --sidebar-w: 12.2rem;
  --page-max: none;
  --rule-color: #808080;

  /* ad placeholders (shared cc-adslot look) */
  --ad-bg: #fff2a8;
  --ad-border: 2px dashed #c00000;

  /* floated photos: small gutter (2007 had none) */
  --photo-gutter: .5em;
}

.theme-blue {
  --page-bg: #46689c;
  --frame-bg: #46689c;
  --gutter: 1px;              /* table cellspacing=1 */
  --chrome-bg: #90b2e2;       /* masthead and sidebar cells */
  --nav-bg: #01017f;          /* the navy of the old newestbar.jpg tabs, now the whole bar */
  --content-bg: #fff;
  --content-pad: .5rem;       /* cellpadding=8 */
  --sidebar-w: 12.2rem;       /* measured 195px (max-content of the old sidebar) */
  --page-max: none;           /* fluid, 100% wide */
}

/* Red family (National Updates, BCCN, International): roll-out after the pilot.
   Variable names are final; values marked TODO are still to be measured. */
.theme-red {
  --fs-base: .95rem;          /* TODO: default.css 95% compounds in body/p/td (~14.4px in p-in-td) */
  --page-bg: #4a4a4a;         /* TODO: confirm (body) */
  --frame-bg: #640000;        /* TODO: confirm (page table) */
  --gutter: 0px;
  --chrome-bg: #fff;          /* TODO: cc_banner.jpg / left_col_bg.jpg / right_col_bg.jpg */
  --nav-bg: transparent;      /* TODO: text menu as in blue (the 2007 bar was cc_menu2.jpg) */
  --link-2007: #990000;
  --content-bg: #fff;         /* TODO: + left_col_bg.jpg */
  --content-pad: 0 0 0 20px;  /* TODO: 20px spacer column + 740px content */
  --sidebar-w: 179px;         /* TODO: right column (nafoot.go) */
  --page-max: 59.375rem;      /* TODO: 950px, centred */
  --rule-color: #bbbbbb;      /* TODO: 80% wide, centred */
}

/* 1b. One switch for the exact 2007 look: <body VLINK="#990000"> and no LINK,
   so template links are red text with a blue underline (dark red once visited),
   content links blue (dark red once visited), no hover effect, fluid column. */
.look-2007 {
  --link-color: var(--accent);
  --link-underline: var(--link-2007);
  --link-visited: var(--accent);
  --link-visited-underline: var(--accent);
  --link-hover-underline: var(--link-underline);
  --link-hover-thickness: auto;
  --content-link-color: #0000ee;
  --content-link-underline: currentColor;
  --content-link-visited: #990000;
  --content-link-visited-underline: currentColor;
  --article-max: none;
}

/* ------------------------------------------------------------------ */
/* 2. Base                                                             */
/* ------------------------------------------------------------------ */
html { background: var(--page-bg); }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: var(--fs-base)/var(--lh-base) var(--font-body);
}
img { vertical-align: middle; border: 0; }   /* no baseline gap under images (standards mode) */
a { color: var(--link-color); text-decoration-color: var(--link-underline); }
a:visited { color: var(--link-visited); text-decoration-color: var(--link-visited-underline); }
a:hover, a:focus-visible {
  text-decoration-color: var(--link-hover-underline);
  text-decoration-thickness: var(--link-hover-thickness);
}
article a { color: var(--content-link-color); text-decoration-color: var(--content-link-underline); }
article a:visited { color: var(--content-link-visited); text-decoration-color: var(--content-link-visited-underline); }
article a:hover, article a:focus-visible { text-decoration-color: currentColor; }
hr { border: 0; border-top: 1px inset var(--rule-color); border-bottom: 1px inset var(--rule-color);
     height: 0; margin: .5rem 0; align-self: stretch; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: absolute; left: .5rem; top: .5rem; z-index: 10; padding: .25rem .5rem;
                   background: #fff; color: var(--accent); }

/* ad placeholders: same size and visible style as the 2007 slots */
.ad-slot {
  display: inline-block; box-sizing: border-box; vertical-align: top;
  width: var(--ad-w, 120px); height: var(--ad-h, 74px);
  border: var(--ad-border); background: var(--ad-bg);
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* 3. Page grid (blue: sidebar left; red adds its own areas later)      */
/* ------------------------------------------------------------------ */
.page {
  box-sizing: border-box;
  min-height: 100vh;
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "mast mast" "nav nav" "side main" "foot foot";
  gap: var(--gutter);
  padding: calc(var(--gutter) * 2);
  background: var(--frame-bg);
}
.masthead { grid-area: mast; }
.sitenav  { grid-area: nav; }
.sidebar  { grid-area: side; }
main      { grid-area: main; }
.sitefoot { grid-area: foot; }

/* ------------------------------------------------------------------ */
/* 4. Masthead: ad row, wordmark, map + region links                    */
/* ------------------------------------------------------------------ */
.masthead { background: var(--chrome-bg); padding: .125rem .125rem 0; }
.ad-row {
  display: grid; grid-template-columns: 1fr 1fr; justify-items: center; align-items: center;
  padding: .3125rem 0;
}
.brand-row {
  display: grid; grid-template-columns: 2fr 1fr; align-items: center;
  min-height: 5.8rem;          /* 93px row in 2007 (map image + padding) */
}
.wordmark { justify-self: start; }
.wordmark img { display: block; }
.regions { display: flex; align-items: flex-start; }
.regions-map { display: block; flex: none; margin-right: 3px; }
.regions-list {
  flex: 1; margin: 0; padding: 1.1rem 0 0; list-style: none; text-align: center; white-space: nowrap;
  font-size: var(--fs-base);   /* the separators are at the cell's size */
}
.regions-list li { display: inline; }
.regions-list li:not(:last-child)::after { content: " | "; color: var(--text); }
.regions-list li.break-after::after { content: " |\A"; white-space: pre; }
.regions-list a, .regions-list .nolink { font-size: var(--fs-xsmall); }
.regions-list .nolink { color: var(--text); }

/* ------------------------------------------------------------------ */
/* 5. Site navigation: plain text links on one blue bar                */
/*    (2026-11-24: replaces the newestbar.jpg sprite and image map)     */
/* ------------------------------------------------------------------ */
.sitenav { background: var(--chrome-bg); padding: 0 .125rem .125rem; margin-top: calc(var(--gutter) * -1); }
.sitenav ul {
  margin: 0; padding: .1875rem .5rem; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.6em;
  background: var(--nav-bg);
  font: bold .6875rem/1.4 var(--font-body);   /* the 11px bold lettering of the 2007 bar */
}
.sitenav a { display: block; color: var(--nav-fg); text-decoration: none; white-space: nowrap; }
.sitenav a:visited { color: var(--nav-fg); }
.sitenav a:hover { text-decoration: underline; }
.sitenav a:focus-visible { outline: 2px solid var(--nav-fg); outline-offset: 1px; }

/* ------------------------------------------------------------------ */
/* 6. Sidebar                                                          */
/* ------------------------------------------------------------------ */
.sidebar {
  background: var(--chrome-bg); padding: .5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.sidebar > :not(hr) { margin-top: 0; margin-bottom: 0; }
.ad-stack { display: flex; flex-direction: column; align-items: center; gap: 1.2em; }
.ad-stack + hr + .ad-stack { padding: 1.2em 0; }   /* the <BR> lines around the second stack */
.sidebar h2 { margin: 0; }
.sidebar .sb-label { font-size: var(--fs-small); font-weight: normal; margin: .5rem 0 0; }
.other-sites p { margin: 1em 0 0; }
.other-sites p:last-child { margin-bottom: .5rem; }
.other-sites img { display: block; margin: 0 auto; }
.other-sites .caption { display: block; font-size: var(--fs-xsmall); }
.bible-search { width: 100%; }
.bible-search h2 { font-size: var(--fs-base); font-weight: bold; }
.bible-search form { margin: 4px 0; font-size: var(--fs-small); }
.bible-search label, .bible-search input[type="search"] { display: block; margin: 0 auto; }
.bible-search label[for="bg-version"] { display: inline; }
.bible-search .sb-credit { font-size: var(--fs-xsmall); margin: 0; }
.sb-links { list-style: none; margin: 0; padding: 0; font-size: var(--fs-xsmall); font-weight: bold; width: 100%; }
.sb-links li { padding: 1rem 0 .3rem; }
.sb-links li + li { border-top: 1px inset var(--rule-color); border-bottom: 0; }
.web-search label { display: block; color: var(--accent); }
.web-search form { margin: 0; }
.web-search input[type="search"] { display: block; margin: 0 auto; }
.web-search p { margin: 0; font-size: var(--fs-small); }

/* ------------------------------------------------------------------ */
/* 7. Content                                                          */
/* ------------------------------------------------------------------ */
main { background: var(--content-bg); padding: var(--content-pad); min-width: 0; }
article { max-width: var(--article-max); }
article::after { content: ""; display: table; clear: both; }  /* contain floated photos */
article > :first-child, article > header > :first-child { margin-top: 0; }
article > :last-child { margin-bottom: 0; }
article p { margin: 1em 0; }
article header { margin: 0 0 1em; }
article header > :last-child { margin-bottom: 0; }
article h1 { font-size: 1em; font-weight: bold; color: var(--accent); margin: 0 0 1em; }
article h1.listing-head, article h2.section-head {
  font-size: 1.17em; font-weight: bold; color: var(--heading-listing); margin: 1em 0;
}
article h1.listing-head { margin-top: 0; }   /* a top margin would collapse through and push a floated photo down */
article .listing-head.accent, article .section-head.accent { color: var(--accent); }
article .byline { margin: 1em 0; }
article .dateline { margin: 1em 0; font-size: var(--fs-small); color: #555; }
/* .dateline carries .visually-hidden: read by screen readers, not shown (2007 look) */
article .accent { color: var(--accent); }
article .small { font-size: var(--fs-small); }
article .center, article .align-center { text-align: center; }
article .align-right { text-align: right; }
.float-left  { float: left;  margin: 0 var(--photo-gutter) 0 0; }
.float-right { float: right; margin: 0 0 0 var(--photo-gutter); }

/* photos: [img]+[caption] tables became <figure>; other photo tables are kept */
figure.photo {
  box-sizing: border-box; display: table; margin: 0;
  width: calc(var(--fig-w, auto) + 6px);   /* the old table: W + cellspacing/padding */
  padding: 3px;
}
figure.photo img { display: block; margin: 0 auto; }   /* displayed size = width/height attributes, as in 2007 */
figure.photo figcaption { text-align: center; padding: 3px 1px 1px; }
figure.photo-left  { float: left;  margin: 0 var(--photo-gutter) .25em 0; }
figure.photo-right { float: right; margin: 0 0 .25em var(--photo-gutter); }
figure.photo-center { margin: 0 auto; }
/* kept tables: their presentational attributes became classes/CSS (convert_fragment.table_attrs),
   rendering as the attributes did; align=left/right uses .float-left/.float-right above */
article table.table-center { margin-left: auto; margin-right: auto; }
article table.bordered { border: var(--table-border, 1px) outset; }   /* border="" / border=N */
article table.bordered > * > tr > td, article table.bordered > * > tr > th { border: 1px inset; }
article table.cellspacing-0 { border-spacing: 0; }
article table.cellspacing { border-spacing: var(--cellspacing); }
article table.cellpadding-0 > * > tr > td, article table.cellpadding-0 > * > tr > th { padding: 0; }
article table.cellpadding > * > tr > td, article table.cellpadding > * > tr > th { padding: var(--cellpadding); }
article caption.caption-bottom { caption-side: bottom; }
article .align-left { text-align: left; }

/* ------------------------------------------------------------------ */
/* 8. Footer                                                           */
/* ------------------------------------------------------------------ */
.sitefoot { background: var(--chrome-bg); font-size: var(--fs-xsmall); text-align: center; padding: .25rem .5rem; }
.sitefoot p { margin: 0; }

/* ------------------------------------------------------------------ */
/* 9. The red family: Mission Fields ("mf") + BC Christian News ("bccn") */
/* ------------------------------------------------------------------ */
/* Logo: /images_new/cc_banner.jpg, unchanged (950x120, red; the last logo Mission Fields carried
   on the red National na.cgi layout, 2005-2007); its rounded corners are drawn on #4a4a4a, the page
   colour. Flexible: rem/em, grid/flex; px only for image and ad sizes. No JavaScript. One small rule
   set for narrow windows (sidebar under the article). Layout: _src/_layouts/missionfields.html.
   Rules written :is(.theme-mf, .theme-bccn) are shared with BC Christian News (section 10;
   owner-approved mock, check-point 2, 2026-11-25; tools/bccn/css_merge.py). */
/* ------------------------------------------------------------------ */
/* 9a. Red family custom properties (.theme-mf, .theme-bccn)           */
/* ------------------------------------------------------------------ */
:is(.theme-mf, .theme-bccn) {
  --fs-base: 1rem;
  --lh-base: 1.5;                 /* readable body text (2007 was "normal", ~1.15) */
  --text: #1a1a1a;
  --muted: #5a5a5a;
  --accent: #990000;              /* the 2006-07 red headline colour (link=#990000 on the red pages) */
  --red-dark: #640000;         /* the red page table / banner red */

  --page-bg: #4a4a4a;             /* body bgcolor of the red layout; the banner's corner colour */
  --frame-bg: #fff;
  --gutter: 0px;
  --page-max: 59.375rem;          /* 950px: the banner's width, centred */
  --chrome-bg: #fff;
  --nav-bg: #fff;                 /* the white bar of cc_menu2.jpg, now text */
  --nav-fg: #222;
  --content-bg: #fff;
  --content-pad: 1.25rem 1.75rem 2rem;
  --sidebar-w: 15.5rem;
  --rule-color: #d9d3cb;

  --red-bar-bg: #f2ede7;           /* issue bar: warm light grey (2007 used #cccccc) */
  --red-side-bg: #f7f4f0;
  --red-line: #d9d3cb;

  /* links: dark red everywhere, as on the red Mission Fields pages; darker once visited */
  --link-color: var(--accent);
  --link-underline: currentColor;
  --link-visited: var(--red-dark);
  --link-visited-underline: currentColor;
  --content-link-color: var(--accent);
  --content-link-underline: currentColor;
  --content-link-visited: var(--red-dark);
  --content-link-visited-underline: currentColor;

  --article-max: 44rem;           /* ~75 characters a line */
  --photo-gutter: 1rem;
}

/* ------------------------------------------------------------------ */
/* 9b. Mission Fields rules; :is(.theme-mf, .theme-bccn) = shared       */
/* ------------------------------------------------------------------ */

/* page grid: sidebar on the right, as on the red na.cgi pages */
:is(.theme-mf, .theme-bccn) .page {
  min-height: 0;
  margin: 1rem auto;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  grid-template-rows: auto auto auto 1fr auto;
  grid-template-areas: "mast mast" "nav nav" "bar bar" "main side" "foot foot";
}
.theme-mf .mf-bar { grid-area: bar; }

/* masthead: the logo image exactly as it is, scaled down only if the window is narrower */
:is(.theme-mf, .theme-bccn) .masthead { background: var(--page-bg); padding: 0; }
:is(.theme-mf, .theme-bccn) .banner { display: block; }
:is(.theme-mf, .theme-bccn) .banner img { display: block; width: 100%; max-width: 950px; height: auto; }

/* site navigation: one white bar of text links, "home | international | ...", as cc_menu2.jpg read */
:is(.theme-mf, .theme-bccn) .sitenav {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  margin: 0; padding: .375rem 1.75rem; gap: .25rem 2rem;
  background: var(--nav-bg); border-bottom: 1px solid var(--red-line);
}
:is(.theme-mf, .theme-bccn) .sitenav ul {
  padding: 0; background: none; column-gap: 0; justify-content: flex-start;
  font: .875rem/1.5 var(--font-body);
}
:is(.theme-mf, .theme-bccn) .sitenav li:not(:last-child)::after { content: "|"; color: #9a9a9a; margin: 0 .5em; }
:is(.theme-mf, .theme-bccn) .sitenav a { display: inline; color: var(--nav-fg); }
:is(.theme-mf, .theme-bccn) .sitenav a:visited { color: var(--nav-fg); }
:is(.theme-mf, .theme-bccn) .sitenav a[aria-current] { color: var(--accent); font-weight: bold; }
:is(.theme-mf, .theme-bccn) .sitenav .regions-text { font-size: .75rem; color: var(--muted); }
:is(.theme-mf, .theme-bccn) .sitenav .regions-text a { color: var(--muted); }

/* Mission Fields bar: the section name (HTML text, not an image) + the issue links */
.theme-mf .mf-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem;
  padding: .75rem 1.75rem .625rem;
  background: var(--red-bar-bg); border-bottom: 3px solid var(--accent);
}
.theme-mf .mf-name { margin: 0; font: bold 1.75rem/1.15 var(--font-body); color: var(--accent); }
.theme-mf .mf-name a, .theme-mf .mf-name a:visited { color: inherit; text-decoration: none; }
.theme-mf .mf-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.theme-mf .mf-issue { font-size: 1.125rem; font-weight: normal; color: var(--text); }
.theme-mf .mf-issue::before { content: "\2014\00a0"; color: var(--muted); }
.theme-mf .issuenav { margin-left: auto; }
.theme-mf .issuenav ul {
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none;
  font-size: .9375rem; font-weight: bold;
}

/* content column */
:is(.theme-mf, .theme-bccn) main { padding: var(--content-pad); }
:is(.theme-mf, .theme-bccn) article h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; }
:is(.theme-mf, .theme-bccn) article h2 {
  font-size: 1.25rem; line-height: 1.3; color: var(--accent);
  margin: 2rem 0 .75rem; padding-bottom: .25rem; border-bottom: 1px solid var(--red-line);
}
:is(.theme-mf, .theme-bccn) article h3 { font-size: 1.0625rem; line-height: 1.3; margin: 0 0 .25rem; }
:is(.theme-mf, .theme-bccn) article p { margin: 0 0 1em; }
:is(.theme-mf, .theme-bccn) article header { margin-bottom: 1.5rem; }
:is(.theme-mf, .theme-bccn) article .byline { margin: 0; font-weight: bold; }
:is(.theme-mf, .theme-bccn) article .dateline { margin: .125rem 0 0; font-size: .875rem; color: var(--muted); }
:is(.theme-mf, .theme-bccn) article .intro { font-size: 1.0625rem; }
:is(.theme-mf, .theme-bccn) article .source {
  margin-top: 2rem; padding-top: .75rem; border-top: 1px solid var(--red-line);
  font-size: .875rem; color: var(--muted);
}
:is(.theme-mf, .theme-bccn) figure.photo figcaption { font-size: .875rem; line-height: 1.35; color: #444; padding-top: .375rem; }
:is(.theme-mf, .theme-bccn) figure.photo-right { margin: .25rem 0 1rem var(--photo-gutter); }
:is(.theme-mf, .theme-bccn) figure.photo-left { margin: .25rem var(--photo-gutter) 1rem 0; }
:is(.theme-mf, .theme-bccn) figure.photo { max-width: 100%; }
:is(.theme-mf, .theme-bccn) figure.photo img { max-width: 100%; height: auto; }
:is(.theme-mf, .theme-bccn) br.clear-both { clear: both; }           /* <br clear="all"> */
:is(.theme-mf, .theme-bccn) br.clear-left { clear: left; }
:is(.theme-mf, .theme-bccn) br.clear-right { clear: right; }
.theme-mf .note { font-size: .9375rem; color: var(--muted); }
:is(.theme-mf, .theme-bccn) .img-missing {                           /* an image that was never preserved */
  display: inline-block; padding: .75rem 1rem; border: 1px dashed var(--red-line);
  font-size: .875rem; color: var(--muted); background: var(--red-side-bg);
}
.theme-mf section.ministry { margin: 0 0 1.5rem; }
.theme-mf section.ministry h2 { font-size: 1.125rem; margin: 1.5rem 0 .5rem; }

/* "in print" line and previous/next in the issue */
.theme-mf .inprint { font-size: .875rem; color: var(--muted); }
:is(.theme-mf, .theme-bccn) .pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--red-line); font-size: .9375rem;
}
:is(.theme-mf, .theme-bccn) .pager a { display: block; max-width: 48%; }
:is(.theme-mf, .theme-bccn) .pager .next { margin-left: auto; text-align: right; }
:is(.theme-mf, .theme-bccn) .pager span { display: block; font-size: .8125rem; color: var(--muted); }

/* issue index: features */
.theme-mf .features { list-style: none; margin: 0; padding: 0; }
.theme-mf .features > li { padding: .75rem 0; border-bottom: 1px dotted var(--red-line); }
.theme-mf .features > li:first-child { padding-top: 0; }
.theme-mf .features p { margin: 0; }
.theme-mf .features .lead::after { content: ""; display: table; clear: both; }
.theme-mf .features .lead figure { float: right; margin: 0 0 .5rem 1rem; }

/* issue index: Directory of Ministries in balanced columns, one block per category */
.theme-mf .directory { columns: 2 15rem; column-gap: 2rem; }
.theme-mf .directory > * { break-inside: avoid; margin: 0 0 1rem; }
.theme-mf .directory h3 {
  font-size: .9375rem; margin: 0 0 .25rem; padding: .125rem .5rem;
  background: var(--red-bar-bg); color: var(--text);
}
.theme-mf .directory ul { margin: 0; padding: 0 0 0 1.25rem; font-size: .9375rem; line-height: 1.4; }

/* print edition: a plain grid of linked page scans, one <figure> per page */
:is(.theme-mf, .theme-bccn) .print-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 1rem .75rem;
  margin: 0; padding: 0; list-style: none;
}
:is(.theme-mf, .theme-bccn) .print-grid figure { margin: 0; text-align: center; font-size: .8125rem; color: var(--muted); }
:is(.theme-mf, .theme-bccn) .print-grid img {
  display: block; width: 100%; height: auto; border: 1px solid #bbb; background: #fff;
}
:is(.theme-mf, .theme-bccn) .print-grid a:hover img, :is(.theme-mf, .theme-bccn) .print-grid a:focus-visible img { border-color: var(--accent); }
:is(.theme-mf, .theme-bccn) .print-grid figcaption { padding-top: .25rem; }

/* landing: issues by year */
.theme-mf .yearnav ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; font-weight: bold; }
.theme-mf .issues {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1.25rem;
  margin: 0; padding: 0; list-style: none;
}
.theme-mf .issue-card { font-size: .875rem; line-height: 1.4; color: var(--muted); }
.theme-mf .issue-card p { margin: .25rem 0 0; }
.theme-mf .issue-card .cover {
  display: block; aspect-ratio: 6 / 5; overflow: hidden; margin-bottom: .5rem;
  background: var(--red-bar-bg); border: 1px solid var(--red-line);
}
.theme-mf .issue-card .cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.theme-mf .issue-card .cover.no-image {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem;
  box-sizing: border-box; font-size: .8125rem; color: var(--muted);
}
.theme-mf .issue-card .title { display: block; font-size: 1.0625rem; font-weight: bold; color: var(--accent); }
.theme-mf .successor {
  margin: 2rem 0 0; padding: .75rem 1rem; background: var(--red-bar-bg); border-left: 4px solid var(--accent);
}

/* sidebar: this issue's contents + ad slots */
.theme-mf .sidebar {
  align-items: stretch; text-align: left; padding: 1.25rem 1rem;
  background: var(--red-side-bg); border-left: 1px solid var(--red-line);
  gap: 1.25rem; justify-content: flex-start;
}
.theme-mf .sidebar h2 {
  font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin: 0 0 .5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--red-line);
}
.theme-mf .toc { margin: 0; padding: 0; list-style: none; font-size: .875rem; line-height: 1.35; }
.theme-mf .toc li { margin: 0 0 .5rem; }
.theme-mf .toc [aria-current] { font-weight: bold; color: var(--text); }
.theme-mf .toc .toc-more { margin-top: .75rem; padding-top: .5rem; border-top: 1px solid var(--red-line); }
:is(.theme-mf, .theme-bccn) .sidebar .ad-stack { gap: .75rem; }

/* ad slots under the article (the two 360x60 banners of the red layout) */
:is(.theme-mf, .theme-bccn) .ad-row-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem;
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--red-line);
}

/* footer */
:is(.theme-mf, .theme-bccn) .sitefoot {
  background: var(--red-dark); color: #fff; font-size: .8125rem; padding: .625rem 1.75rem; text-align: left;
}
:is(.theme-mf, .theme-bccn) .sitefoot a, :is(.theme-mf, .theme-bccn) .sitefoot a:visited { color: #fff; }

/* narrow windows: one column, sidebar after the article (no other mobile work) */
@media (max-width: 45rem) {
  .theme-mf .page {
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "mast" "nav" "bar" "main" "side" "foot";
  }
  .theme-mf .sidebar { border-left: 0; border-top: 1px solid var(--red-line); }
  .theme-mf main { padding: 1rem; }
  .theme-mf .sitenav, .theme-mf .mf-bar, .theme-mf .sitefoot { padding-left: 1rem; padding-right: 1rem; }
  .theme-mf .issuenav { margin-left: 0; }
}

html:has(body:is(.theme-mf, .theme-bccn)) { background: #4a4a4a; }   /* --page-bg lives on body; html keeps the root white otherwise */
.theme-mf .issue-card a { text-decoration: none; }
.theme-mf .issue-card a .title { text-decoration: underline; }
.theme-mf .issue-card a:hover .title { text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ */
/* 10. BC Christian News: the "bccn" theme (owner-approved mock,        */
/*     check-point 2, 2026-11-25; reports/bccn/mock)                     */
/* ------------------------------------------------------------------ */
/* The 2006-07 red BCCN layout (cgi-bin/bchead.go + bcfoot.go): cc_banner.jpg masthead unchanged,
   the cc_menu2.jpg menu as text, the BC section nav, content with 2 ad slots below it, a right
   sidebar (8 ad slots, Contact / Partner / Advertise, Bible search), a minimal footer, no left
   sidebar. The shared red-family rules are in section 9 (:is(.theme-mf, .theme-bccn)); these are
   the BCCN-only ones. Layout: _src/_layouts/bccn.html. */
.theme-bccn {
  --sidebar-w: 12.5rem;
}

/* [bccn] page grid: as mf, the bar row holds the BC section nav */
.theme-bccn .section-bar { grid-area: bar; }

/* [bccn] section bar: the paper's name (+ issue) and the BC section nav of bchead.go.
   Same look as the mf bar (.mf-bar/.mf-name/.mf-issue); the nav gets its own line. */
.theme-bccn .section-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem;
  padding: .75rem 1.75rem .5rem;
  background: var(--red-bar-bg); border-bottom: 3px solid var(--accent);
}
.theme-bccn .bar-name { margin: 0; font: bold 1.75rem/1.15 var(--font-body); color: var(--accent); }
.theme-bccn .bar-name a, .theme-bccn .bar-name a:visited { color: inherit; text-decoration: none; }
.theme-bccn .bar-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.theme-bccn .bar-issue { font-size: 1.125rem; font-weight: normal; color: var(--text); }
.theme-bccn .bar-issue::before { content: "\2014\00a0"; color: var(--muted); }
.theme-bccn .bcnav { flex-basis: 100%; }
.theme-bccn .bcnav ul {
  display: flex; flex-wrap: wrap; gap: .125rem 0; margin: 0; padding: 0; list-style: none;
  font-size: .9375rem; font-weight: bold;
}
.theme-bccn .bcnav li:not(:last-child)::after { content: "|"; font-weight: normal; color: #9a9a9a; margin: 0 .5em; }
.theme-bccn .bcnav a[aria-current] { color: var(--text); text-decoration: none; }
.theme-bccn .nolink { color: var(--muted); font-weight: normal; }

/* [bccn] floated images without a caption (head shots, cartoons): the same gutter as figures */
.theme-bccn article img.float-left { margin: .25rem var(--photo-gutter) .5rem 0; }
.theme-bccn article img.float-right { margin: .25rem 0 .5rem var(--photo-gutter); }
.theme-bccn article img { max-width: 100%; height: auto; }

/* [bccn] issue index: the section line, the front page, the contents by section */
.theme-bccn .issue-sections ul {
  display: flex; flex-wrap: wrap; gap: .25rem 0; margin: 0 0 1.25rem; padding: .5rem 0;
  list-style: none; font-size: .9375rem;
  border-top: 1px solid var(--red-line); border-bottom: 1px solid var(--red-line);
}
.theme-bccn .issue-sections li:not(:last-child)::after { content: "|"; color: #9a9a9a; margin: 0 .5em; }
.theme-bccn .front figure.photo { margin: 0 auto 1rem; }
.theme-bccn .front h3 { margin-top: 1.25rem; }
.theme-bccn .issue-contents { columns: 2 17rem; column-gap: 2rem; }
.theme-bccn .issue-sec { break-inside: avoid; margin: 0 0 1.25rem; }
.theme-bccn .issue-sec h3 {
  font-size: 1rem; margin: 0 0 .375rem; padding: .125rem .5rem; background: var(--red-bar-bg);
}
.theme-bccn .issue-sec .count { font-weight: normal; color: var(--muted); font-size: .875rem; }
.theme-bccn .issue-sec ul { margin: 0; padding: 0 0 0 1.25rem; font-size: .9375rem; line-height: 1.4; }
.theme-bccn .issue-sec li { margin: 0 0 .25rem; }

/* [bccn] landing: issues by year, one row of months per year (as the old archive table) */
.theme-bccn .yearnav ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; padding: 0; list-style: none; font-weight: bold; }
.theme-bccn .year { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: baseline;
  padding: .5rem 0; border-bottom: 1px dotted var(--red-line); }
.theme-bccn .year h2 { margin: 0; padding: 0; border: 0; font-size: 1.125rem; }
.theme-bccn .months {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .125rem .75rem;
  margin: 0; padding: 0; list-style: none; font-size: .9375rem;
}
@media (max-width: 62rem) { .theme-bccn .months { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.theme-bccn .months .none { color: #b3aca3; }
.theme-bccn .months .note { display: block; font-size: .75rem; line-height: 1.1; }
.theme-bccn ul.plain { margin: 0; padding: 0 0 0 1.25rem; }

/* [bccn] sidebar: 8 ad slots, Contact / Partner / Advertise, Bible search (bcfoot.go order) */
.theme-bccn .sidebar {
  align-items: stretch; padding: 1.25rem 1rem;
  background: var(--red-side-bg); border-left: 1px solid var(--red-line);
  gap: 1.25rem; justify-content: flex-start;
}
.theme-bccn .sb-links { font-size: .875rem; }
.theme-bccn .sb-links li { padding: .625rem 0; }
.theme-bccn .sb-links li + li { border-top: 1px solid var(--red-line); }
.theme-bccn .sb-links { border-top: 1px solid var(--red-line); border-bottom: 1px solid var(--red-line); }
.theme-bccn .bible-search h2 { font-size: .9375rem; margin: 0 0 .25rem; }
.theme-bccn .bible-search form { display: grid; gap: .25rem; justify-items: center; margin: 0 0 .5rem; font-size: .8125rem; }
.theme-bccn .bible-search input[type="search"] { width: 100%; max-width: 10rem; box-sizing: border-box; }
.theme-bccn .bible-search label { display: block; margin: 0; }
.theme-bccn .bible-search .sb-credit { font-size: .75rem; color: var(--muted); }

/* [bccn] narrow windows: one column, sidebar after the article; ads side by side */
@media (max-width: 45rem) {
  .theme-bccn .page {
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "mast" "nav" "bar" "main" "side" "foot";
  }
  .theme-bccn .sidebar { border-left: 0; border-top: 1px solid var(--red-line); }
  .theme-bccn .sidebar .ad-stack { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .theme-bccn main { padding: 1rem; }
  .theme-bccn .sitenav, .theme-bccn .section-bar, .theme-bccn .sitefoot { padding-left: 1rem; padding-right: 1rem; }
  .theme-bccn .year { grid-template-columns: minmax(0, 1fr); }
  .theme-bccn .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

html:has(body.theme-bccn) { background: #4a4a4a; }
