/* directories.css — the "Directories" bar (2026-12-05, com-directory-nav).
   One slim row that names the three directories plainly (Officials,
   Businesses, Churches) plus the Wire and a site-wide name search.
   It appears only on directory pages (scorecard family, official profiles,
   the Fredericksburg page, the business directory). The ministry top nav is
   left alone: Adam removed a Citizen dropdown from it on 2026-05-23.

   Two placements:
   - Main-site pages (fixed masthead): the bar sits just under the masthead
     and scrolls away with the page. A spacer of the bar's height goes in the
     flow right after it, so whatever room a page already leaves for the
     masthead (var(--nav-clear) or its own number) now starts below the bar.
   - Business-directory pages (no fixed masthead): .dirbar--flow, in flow at
     the top of <body>.
   Self-contained colours so it reads the same on the dark ministry pages and
   the light green business pages. No fonts, no images, no external files. */

html.has-dirbar { --dirbar-h: 46px; }
.dirbar-spacer { height: var(--dirbar-h, 46px); }

.dirbar {
  position: absolute; top: var(--nav-h, 70px); left: 0; right: 0; z-index: 900;
  background: #101826; color: #E6EAF0;
  border-bottom: 1px solid rgba(168,176,188,0.28);
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}
.dirbar--flow { position: relative; top: auto; }
.dirbar-in {
  max-width: 1100px; margin: 0 auto; height: 46px; box-sizing: border-box;
  display: flex; align-items: stretch; gap: 2px; padding: 0 12px;
}
.dirbar-label {
  align-self: center; margin-right: 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; color: #A8B0BC; white-space: nowrap;
}
.dirbar a.dirbar-link, .dirbar button.dirbar-search {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 10px; box-sizing: border-box;
  color: #E6EAF0; text-decoration: none; white-space: nowrap;
  border: 0; border-bottom: 2px solid transparent; background: none;
  font: inherit; cursor: pointer; border-radius: 0;
}
.dirbar a.dirbar-link:hover, .dirbar button.dirbar-search:hover { background: rgba(255,255,255,0.06); }
.dirbar a.dirbar-link:focus-visible, .dirbar button.dirbar-search:focus-visible { outline: 2px solid #A8B0BC; outline-offset: -2px; }
.dirbar a.dirbar-link.is-on { border-bottom-color: #C9D1DC; color: #fff; }
.dirbar button.dirbar-search {
  margin-left: auto; align-self: center; min-height: 36px; padding: 0 12px;
  border: 1px solid rgba(168,176,188,0.45); border-radius: 18px; color: #fff;
}
.dirbar button.dirbar-search[aria-expanded="true"] { background: rgba(255,255,255,0.12); }
.dirbar-search svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* Search panel: drops under the bar, over the page. */
.dirbar-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #101826; border-bottom: 1px solid rgba(168,176,188,0.28);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}
.dirbar-panel[hidden] { display: none; }
.dirbar-panel-in { max-width: 760px; margin: 0 auto; padding: 12px 14px 14px; box-sizing: border-box; }
.dirbar-panel label { display: block; font-size: 12px; font-weight: 700; color: #A8B0BC; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.dirbar-panel input {
  width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px;
  font-family: inherit; font-size: 16px; font-weight: 400; color: #fff; background: #0B111B;
  border: 1px solid rgba(168,176,188,0.5); border-radius: 8px;
}
.dirbar-panel input:focus { outline: 2px solid #C9D1DC; outline-offset: 1px; }
.dirbar-status { min-height: 1.2em; margin: 6px 0 0; font-size: 13px; font-weight: 400; color: #A8B0BC; }
.dirbar-results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.dirbar-results .dirbar-h { padding: 10px 4px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: #A8B0BC; }
.dirbar-results a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; box-sizing: border-box;
  color: #fff; text-decoration: none; border-radius: 6px;
}
.dirbar-results a:hover, .dirbar-results a.is-active { background: rgba(255,255,255,0.08); }
.dirbar-results .dr-main { flex: 1 1 auto; min-width: 0; }
.dirbar-results .dr-name { display: block; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.dirbar-results .dr-sub { display: block; font-weight: 400; font-size: 13px; color: #B8C0CC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dirbar-results .dr-tag { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 10px; border: 1px solid rgba(168,176,188,0.5); color: #E6EAF0; }
.dirbar-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dirbar-more a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px;
  border: 1px solid rgba(168,176,188,0.4); color: #E6EAF0; text-decoration: none; font-size: 13px;
}
.dirbar-more a:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 719px) {
  .dirbar .dirbar-label, .dirbar a.dirbar-wide { display: none; }
  .dirbar-in { padding: 0 2px; gap: 0; }
  .dirbar a.dirbar-link { padding: 0 8px; font-size: 14px; }
  .dirbar button.dirbar-search { padding: 0 10px; font-size: 14px; margin-right: 4px; }
}
@media (max-width: 389px) {
  .dirbar a.dirbar-link { padding: 0 6px; font-size: 13px; }
  .dirbar button.dirbar-search { padding: 0 8px; font-size: 13px; gap: 4px; }
}
@media (max-width: 345px) {
  .dirbar .dirbar-search-word { display: none; }
  .dirbar button.dirbar-search { min-width: 40px; }
}
@media print { .dirbar { display: none; } }

/* ── Official profile pages (generate-profiles.py, 2026-12-05) ─────────────
   Kept here, under the bar's own ?v=, so profile.css / ASSET_VERSION and the
   hand pages' cache keys stay untouched. */

/* Score line in the hero: score, grade, coverage, and the method link. */
.prof-hero-score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; }
.prof-hero-score .phs-main {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px;
  min-height: 44px; box-sizing: border-box; padding: 8px 14px;
  border: 1px solid var(--border, rgba(168,176,188,0.3)); border-radius: 10px;
  background: rgba(255,255,255,0.04); color: inherit; text-decoration: none;
}
.prof-hero-score .phs-main:hover { background: rgba(255,255,255,0.08); }
.prof-hero-score .phs-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: var(--gray, #A8B0BC); }
.prof-hero-score strong { font-size: 1.35rem; line-height: 1; }
.prof-hero-score .phs-max { font-size: 0.85rem; color: var(--gray, #A8B0BC); }
.prof-hero-score .phs-grade { display: inline-block; min-width: 1.6em; text-align: center; padding: 1px 6px; border: 1.5px solid; border-radius: 6px; font-weight: 800; font-size: 0.9rem; }
.prof-hero-score .phs-ans { font-size: 0.8rem; color: var(--gray, #A8B0BC); }
.prof-hero-score .phs-how { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent, #A8B0BC); font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .prof-header-text .prof-hero-score { justify-content: center; }
}

/* "On this page": wrap instead of a hidden sideways scroller on narrower screens. */
@media (max-width: 1099px) {
  .prof-toc .prof-toc-nav { flex-wrap: wrap; overflow-x: visible; gap: 4px 6px; }
  .prof-toc .prof-toc-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--border, rgba(168,176,188,0.3)); border-radius: 20px; }
}
/* Wide screens: the pinned TOC starts below the Directories bar. */
@media (min-width: 1100px) {
  html.has-dirbar .prof-toc { top: calc(88px + var(--dirbar-h, 46px)); }
}

/* Answer sources: bigger tap targets, and an inline source card on tap
   (assets/js/directories.js) instead of a jump to the bottom of the page. */
.prof-fn-sup .prof-fn-link { display: inline-block; min-width: 1.5em; text-align: center; padding: 2px 3px; }
@media (pointer: coarse) {
  .prof-fn-sup { font-size: 0.8rem; }
  .prof-fn-sup .prof-fn-link { min-width: 28px; min-height: 28px; line-height: 28px; padding: 0 2px; margin: -4px 0; border-radius: 6px; }
}
.prof-fn-sup .prof-fn-link[aria-expanded="true"] { background: rgba(255,255,255,0.12); }
.fn-pop {
  margin: 8px 0 4px; padding: 10px 12px 10px 14px; border-left: 3px solid var(--accent, #A8B0BC);
  background: rgba(255,255,255,0.04); border-radius: 0 8px 8px 0; font-size: 0.86rem; line-height: 1.5;
}
.fn-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.fn-pop-head span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray, #A8B0BC); }
.fn-pop-close { min-width: 40px; min-height: 36px; border: 1px solid var(--border, rgba(168,176,188,0.3)); border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.fn-pop .prof-fn-title { font-weight: 700; }
.fn-pop-all { display: inline-block; margin-top: 6px; font-size: 0.8rem; }

/* ── Business directory breadcrumbs (fxbg/commerce generators, 2026-12-05) ── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0 0 14px; font-size: 0.9rem; color: var(--gray, #5c6570); }
.crumbs a { display: inline-flex; align-items: center; min-height: 36px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--text, #1a1a1a); font-weight: 600; }
