/* Bettesworth Plumbline's own CSS: only what the app's fetched chrome does not already supply (fonts, colour tokens, .wrap, .panel,
   .chip, .crumbs, .eyebrow, .btn*, .pager, .rows — all come from plumbline.css via the chrome). This file is the blog's own structure:
   the article, the listing rows, the sidebar's Latest widget, comments, 404. No lazy images, no table of contents, no related-posts
   section, no estimate/services CTA — this site's standing rules (inc/images.php; single.php, parts/listing.php). */

.bc-adslot { height: 0; overflow: hidden; margin: 0; }

/* ---- the article's two-column grid: beside the sidebar, or full-width when there is none; a listing is never split ---- */
.bc-post { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; padding: 26px 0 40px; }
.bc-post > * { min-width: 0; } /* an image's intrinsic size (width/height attrs) can otherwise blow out the whole grid track it shares */
.bc-post--full { grid-template-columns: 1fr; }
.bc-list { padding: 0 0 10px; }
.bc-col { min-width: 0; }
.bc-side { min-width: 0; }
/* the owner's rule: this sidebar never scrolls with the page — no position: sticky here, on purpose */

/* ---- the article itself: dense, full-width within its column ---- */
.bc-paper { padding: 26px clamp(20px, 3vw, 36px) 30px; }
.bc-head h1 { margin-top: 10px; }
.bc-byline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 10px 0 0; }
.bc-hero { margin: 20px -4px 22px; }
.bc-hero img { display: block; min-width: 0; width: 100%; height: auto; border-radius: var(--r-s); }
.bc-hero figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.entry-content, .article-content { font-size: 18px; line-height: 1.68; color: var(--ink); max-width: 72ch; }
.entry-content > *, .article-content > * { max-width: 72ch; }
.entry-content h2, .article-content h2 { margin-top: 1.3em; }
.entry-content h3, .article-content h3 { margin-top: 1.1em; }
.entry-content img, .article-content img { height: auto; border-radius: var(--r-s); }
.entry-content blockquote, .article-content blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--amber); color: var(--ink-2); }
/* a table wider than the column scrolls within itself (bct_wrap_tables() in functions.php adds .bc-table-scroll); the page never does */
.bc-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; }
.entry-content table, .article-content table { width: 100%; min-width: 480px; border-collapse: collapse; margin: 0; }
.entry-content th, .entry-content td, .article-content th, .article-content td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
.bc-tags { margin-top: 22px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- previous / next ---- */
.bc-hop { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.bc-hop .panel { margin-bottom: 0; text-decoration: none; color: var(--ink); display: block; }
.bc-hop-nx { text-align: right; }
@media (max-width: 640px) { .bc-hop { grid-template-columns: 1fr; } .bc-hop-nx { text-align: left; } }

/* ---- the sidebar: widget title, a lead card, then ranked rows ("best-in-class" Latest widget) ---- */
.bc-side .widget { margin-bottom: 20px; }
.bc-side .widget-title { font: 750 13px/1 var(--display); font-stretch: 110%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-ink); margin: 0 0 12px; }
.bc-latest-lead { display: block; color: var(--ink); text-decoration: none; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1.5px solid var(--rule); }
.bc-latest-lead img { display: block; min-width: 0; width: 100%; height: 132px; object-fit: cover; border-radius: var(--r-s); margin-bottom: 8px; }
.bc-latest-lead-t { display: block; font: 750 16.5px/1.3 var(--display); font-stretch: 98%; margin-bottom: 4px; }
.bc-latest-lead:hover .bc-latest-lead-t { color: var(--amber-ink); }
.bc-latest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bc-latest-list a { display: grid; grid-template-columns: 18px 52px minmax(0, 1fr); gap: 10px; align-items: center; color: var(--ink); text-decoration: none; padding: 7px 0; }
.bc-latest-list img { min-width: 0; width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-s); }
.bc-latest-rank { font: 800 14px/1 var(--display); color: var(--amber-ink); text-align: center; }
.bc-latest-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 650 14px/1.3 var(--body); }
.bc-latest-list a:hover .bc-latest-t { color: var(--amber-ink); }

/* ---- listings: the dated index ---- */
.bc-list-head { padding: 22px 0 6px; }
.bc-list-head .lede { color: var(--ink-2); max-width: 70ch; }
.bc-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bc-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 96px; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1.5px solid var(--rule); color: var(--ink); text-decoration: none; }
.bc-row:hover h3 { text-decoration: underline; }
.bc-row-date { display: grid; justify-items: center; line-height: 1.1; color: var(--ink-3); }
.bc-row-date b { font: 800 22px/1 var(--display); color: var(--ink); }
.bc-row-date span { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.bc-row-t h3 { margin: 2px 0 3px; font-size: 19px; }
.bc-row-t p { margin: 0; }
.bc-row-pic { display: block; border-radius: var(--r-s); overflow: hidden; }
.bc-row-pic img { min-width: 0; width: 96px; height: 72px; object-fit: cover; display: block; }
@media (max-width: 640px) { .bc-row { grid-template-columns: 44px minmax(0, 1fr); } .bc-row-pic { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- WordPress's own pager, in the site's look ---- */
.bc-pager { display: flex; gap: 8px; justify-content: center; margin: 26px 0 10px; flex-wrap: wrap; }
.bc-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 12px; border-radius: var(--r-s);
  border: 1.5px solid var(--ink); font: 650 14px var(--body); color: var(--ink); text-decoration: none; }
.bc-pager .page-numbers.current { background: var(--amber); border-color: var(--amber); color: #1c1f23; }
.bc-pager .page-numbers.dots { border: 0; }

/* ---- comments ---- */
.bc-comments { margin-top: 30px; padding-top: 24px; border-top: 1.5px solid var(--rule); }
.bc-comment-list { list-style: none; margin: 0; padding: 0; }
.bc-comment-list li { padding: 14px 0; border-bottom: 1.5px solid var(--rule); }
.bc-comments .comment-form input[type], .bc-comments .comment-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1.5px solid var(--rule-2); border-radius: var(--r-s); background: var(--sheet); color: var(--ink); font: 500 15px var(--body); margin: 4px 0 12px; }
.bc-comments .comment-form textarea { min-height: 100px; }
.bc-comments .comment-form label { font: 700 13.5px var(--body); color: var(--ink-2); }

/* ---- a page's designed header: a warm band with the drafting grid, a prose card overlapping it (site's standing page design) ---- */
.bc-page-head { position: relative; overflow: hidden; background: var(--wash); border-bottom: 2px solid var(--ink); }
.bc-page-head::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 42px 42px; }
.bc-page-head-in { position: relative; max-width: 760px; padding: 34px 20px 52px; text-align: center; }
.bc-page-head .crumbs { justify-content: center; display: flex; }
.bc-page-kicker { font: 750 12.5px/1 var(--display); font-stretch: 110%; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-ink); margin: 14px 0 6px; }
.bc-page-title { margin: 0; }
.bc-page-card { max-width: 800px; margin-top: -30px; padding-bottom: 40px; position: relative; z-index: 1; }
.bc-page-card .bc-paper { padding: clamp(22px, 4vw, 40px); border-top: 3px solid var(--amber); }
@media (max-width: 640px) { .bc-page-card { margin-top: -18px; } }

/* ---- 404 ---- */
.bc-lost { max-width: 560px; margin: 0 auto; padding: 60px 20px 80px; text-align: center; }
.bc-404-find { display: flex; gap: 8px; margin: 22px 0; }
.bc-404-find input { flex: 1; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--rule-2); border-radius: var(--r-s); background: var(--sheet); color: var(--ink); font: 500 16px var(--body); }
.bc-lost .row-wrap { justify-content: center; }

/* ---- the legal footer menu (filled only if the owner adds one in wp-admin) ---- */
.bc-legal-menu ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.bc-legal-menu a { color: var(--ink-3); }

@media (max-width: 960px) { .bc-post, .bc-list { grid-template-columns: 1fr; } }

/* ---- dark mode: a hand-written callout box in a post's own content (older posts, written with a light background baked into an
   inline style) keeps its light background in dark mode unless overridden here — the owner's rule is dark surfaces stay dark
   everywhere, light text on a light box left as-is reads at ~1:1 contrast. The border colour (not background) is left alone. ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .entry-content [style*="background"], :root:not([data-theme='light']) .article-content [style*="background"] {
    background: var(--sheet) !important; color: var(--ink) !important;
  }
  :root:not([data-theme='light']) .entry-content [style*="background"] *, :root:not([data-theme='light']) .article-content [style*="background"] * {
    color: inherit !important;
  }
}
:root[data-theme='dark'] .entry-content [style*="background"], :root[data-theme='dark'] .article-content [style*="background"] {
  background: var(--sheet) !important; color: var(--ink) !important;
}
:root[data-theme='dark'] .entry-content [style*="background"] *, :root[data-theme='dark'] .article-content [style*="background"] * {
  color: inherit !important;
}
