/* The Buildings & Development page (src/buildings/buildings-twin.js). Cards, tables, pills, tabs, pagers and the pop-up are the
   shared .wqx-* classes in wq-twin.css; only what this page adds is here. Colour comes from tokens only; no blur, no coloured edge
   stripes, no keyframes (styles/motion.css owns those). The map is one hue in five steps: it measures a magnitude, so it is
   sequential, and a county with no figure is hatched, never the palest step. */

.bd { display: grid; gap: 18px; }
.bd-trust { margin: 0 0 10px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); max-width: 62em; }
.bd-roles { margin-top: 10px; flex-wrap: wrap; }
.bd-lede { margin: 0 0 8px; font-size: var(--guide-fs-md); line-height: 1.5; font-weight: 600; }
.bd-steps { margin: 10px 0; padding-left: 22px; display: grid; gap: 8px; font-size: var(--guide-fs-md); line-height: 1.5; max-width: 62em; }
.bd-status { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.bd-facts { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.5; max-width: 62em; }

/* the address lookup sits under the search, same width */
.bd-lookform { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: stretch; }
.bd-lookform .wqx-search { flex: 1 1 280px; }
.bd-lookform .wqx-btn { flex: none; min-height: 44px; }
.bd-picks { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.bd-picks .wqx-btn { width: 100%; text-align: left; white-space: normal; }

/* the statements you can paste: the first is the one sentence for a memo */
.bd-stmts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; max-width: 54em; }
.bd-stmt p { margin: 0 0 2px; font-size: var(--guide-fs-md); line-height: 1.5; }
.bd-stmt--lead p { font-size: clamp(17px, 2.8vw, 22px); line-height: 1.4; font-weight: 600; }
.bd-stmt small { display: block; color: var(--guide-color-ink-muted); font-size: var(--guide-fs-xs); line-height: 1.4; }
.bd-stamp { margin-top: 10px; }

/* the map: counties shaded one hue in five steps */
.bd-mapwrap { max-width: 900px; }
.bd-map { width: 100%; height: auto; display: block; }
.bd-co.bd-s0, .bd-key.bd-s0 { fill: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); background: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); }
.bd-co.bd-s1, .bd-key.bd-s1 { fill: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); background: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); }
.bd-co.bd-s2, .bd-key.bd-s2 { fill: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); background: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); }
.bd-co.bd-s3, .bd-key.bd-s3 { fill: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); background: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); }
.bd-co.bd-s4, .bd-key.bd-s4 { fill: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); background: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); }
.bd-co { fill: var(--guide-color-bg-1); stroke: var(--guide-color-border-strong); stroke-width: 0.8; cursor: pointer; }
.bd-co.bd-none { fill: var(--guide-color-bg-2); stroke-dasharray: 3 2; }
.bd-co.is-sel { stroke: var(--guide-color-ink); stroke-width: 2.4; }
.bd-co:hover { stroke: var(--guide-color-ink); stroke-width: 1.6; }
.bd-co:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 1px; }
.bd-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--guide-color-bg-1); border: 1px solid var(--guide-color-border-strong); margin-right: 6px; vertical-align: -1px; }
.bd-key.bd-none { background: var(--guide-color-bg-2); border-style: dashed; }

/* the permit file's status: the words are always written; the tint only repeats them */
.bd-pill { white-space: normal; display: inline-block; max-width: 100%; font-size: var(--guide-fs-xs); }
.bd-pill.bd-recorded { background: color-mix(in srgb, var(--guide-color-lake) 14%, var(--guide-color-paper)); }
.bd-pill.bd-none-recorded { background: var(--guide-color-bg-2); }
.bd-pill.bd-not-in-file { background: var(--guide-color-paper); border: 1px solid var(--guide-color-border-strong); }

/* the table */
.bd-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 10px; }
.bd-filters label { display: grid; gap: 3px; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); }
.bd-filters select { min-height: 40px; max-width: 100%; font: inherit; font-size: var(--guide-fs-sm); color: var(--guide-color-ink); background: var(--guide-color-paper); border: 1px solid var(--guide-color-border-strong); border-radius: 8px; padding: 6px 10px; }
.bd-rowbtn { text-align: left; }
.bd-sub { display: block; margin-top: 2px; color: var(--guide-color-ink-muted); font-size: var(--guide-fs-xs); }
.bd-table td, .bd-table th { vertical-align: top; }

/* one county, and one address */
.bd-record { scroll-margin-top: 80px; border-color: var(--guide-color-border-strong); background: var(--guide-color-bg-1); }
.bd-lines { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; font-size: var(--guide-fs-md); line-height: 1.5; max-width: 62em; }
.bd-facts-table th { width: 32%; font-weight: 600; }
#bd-look { scroll-margin-top: 80px; }

@media (max-width: 640px) {
  .bd-table th:nth-child(5), .bd-table td:nth-child(5), .bd-table th:nth-child(6), .bd-table td:nth-child(6) { display: none; }
  .bd-filters label { flex: 1 1 140px; }
  .bd-filters select { width: 100%; }
  .bd-facts-table th { width: 40%; }
}

/* the printed page: the finder, role tabs, map tabs, buttons, pager and pop-up are left off; every card is kept whole */
@media print {
  .bd-finder, .bd-start, #bd-look, .bd .wqx-actions, .bd .wqx-tabs, .bd-filters, .bd .wqx-pager, #bd-roles { display: none !important; }
  .bd { gap: 10px; }
  .bd-record, .bd-stmt { break-inside: avoid; }
  .bd-map { max-height: 300px; }
}
