/* boston.exchange: forms, notices, privacy choices, footer links, ZIP map outline. Colours come from the child theme's Blocksy palette. */
.bx-form-wrap { max-width: 640px; }
.bx-form { display: grid; gap: 18px; margin: 1em 0; }
.bx-field { display: grid; gap: 6px; }
.bx-field label { font-weight: 600; color: var(--theme-palette-color-4); }
.bx-field input, .bx-field select, .bx-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--theme-palette-color-3); border-radius: 6px; background: var(--theme-palette-color-8); color: var(--theme-palette-color-4); font: inherit; }
.bx-field textarea { min-height: 180px; resize: vertical; }
.bx-field :focus-visible, .bx-btn:focus-visible { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bx-hint, .bx-req-note { margin: 0; font-size: .9375rem; color: var(--theme-palette-color-3); }
.bx-btn { justify-self: start; min-height: 44px; padding: 10px 22px; cursor: pointer; }
.bx-btn--quiet { background: transparent; color: var(--theme-palette-color-1); border: 1px solid var(--theme-palette-color-1); }
.bx-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bx-msg { padding: 12px 16px; border-radius: 8px; border: 1px solid; margin: 1em 0; }
.bx-msg--ok { border-color: #1a7f4b; background: color-mix(in srgb, #1a7f4b 10%, transparent); }
.bx-msg--err { border-color: #b3261e; background: color-mix(in srgb, #b3261e 10%, transparent); }
.bx-choices { border: 1px solid var(--theme-palette-color-5); border-radius: 10px; padding: 16px 18px; background: var(--theme-palette-color-8); margin: 1.5em 0; }
.bx-choices__btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.bx-choices__btns .bx-btn[hidden] { display: none; }
.bx-updated { font-family: "Plex Mono", ui-monospace, monospace; font-size: .875rem; letter-spacing: .04em; color: var(--theme-palette-color-3); }
.bx-note { border-left: 4px solid var(--theme-palette-color-1); padding: 10px 16px; background: var(--theme-palette-color-8); }
/* footer */
.bx-foot { display: grid; gap: 10px; font-size: .875rem; }
.bx-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.bx-foot a { color: inherit; text-underline-offset: .18em; }
.bx-foot p { margin: 0; }
.bx-sw-line { width: 16px; height: 0 !important; border: 0 !important; border-top: 2px solid var(--bp-ink) !important; }
/* homepage cards */
.bx-cards { list-style: none; padding: 0 !important; margin: 1.5em 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.bx-cards li { position: relative; border: 1px solid var(--theme-palette-color-5); border-radius: 12px; padding: 18px 18px 20px; background: var(--theme-palette-color-8); color: var(--theme-palette-color-3); transition: border-color .15s, box-shadow .15s; }
.bx-cards li:hover, .bx-cards li:focus-within { border-color: var(--theme-palette-color-1); box-shadow: 0 10px 24px -18px rgba(15, 39, 64, .6); }
.bx-cards a { display: block; margin-bottom: 6px; color: var(--theme-palette-color-4); text-decoration: none; font-family: "Instrument Sans", sans-serif; font-size: 1.125rem; }
.bx-cards a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.bx-cards a:focus-visible { outline: none; } .bx-cards li:focus-within { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bx-cards li { transition: none; } }
.bx-card-img img { border: 1px solid var(--theme-palette-color-5); border-radius: 14px; height: auto; }
/* ===== Design system v0.2 (docs/DESIGN-SYSTEM.md): exchange ticker, market stalls, exchange board ===== */
.bx-ticker { position: relative; display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--theme-palette-color-5); background: var(--bx-tk-bg, #0f2740); color: #e3edf2; font: 500 .8125rem/1 "Plex Mono", ui-monospace, monospace; letter-spacing: .04em; overflow: hidden; }
.bx-tk-view { flex: 1; overflow: hidden; display: flex; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.bx-tk-list { display: flex; flex: none; gap: 0; margin: 0; padding: 0; list-style: none; animation: bx-tk 60s linear infinite; }
.bx-tk-list li { flex: none; }
.bx-tk-list a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; color: inherit; text-decoration: none; border-right: 1px solid rgba(227, 237, 242, .14); }
.bx-tk-list a:hover, .bx-tk-list a:focus-visible { background: rgba(92, 200, 208, .14); outline: none; }
.bx-tk-list a:focus-visible { box-shadow: inset 0 0 0 2px #5cc8d0; }
.bx-tk-l { color: #9db2bf; text-transform: uppercase; }
.bx-tk-v { color: #5cc8d0; font-variant-numeric: tabular-nums; }
.bx-tk-btn { flex: none; min-width: 64px; min-height: 40px; padding: 0 12px; border: 0; border-right: 1px solid rgba(227, 237, 242, .14); background: transparent; color: #e3edf2; font: inherit; cursor: pointer; }
.bx-tk-btn:focus-visible { outline: 2px solid #5cc8d0; outline-offset: -2px; }
.bx-tk-play, .is-paused .bx-tk-pause { display: none; } .is-paused .bx-tk-play { display: inline; }
.bx-ticker:hover .bx-tk-list, .bx-ticker:focus-within .bx-tk-list, .bx-ticker.is-paused .bx-tk-list { animation-play-state: paused; }
@keyframes bx-tk { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .bx-tk-list { animation: none; } .bx-tk-dup { display: none; } .bx-tk-view { overflow-x: auto; mask-image: none; } .bx-tk-btn { display: none; } }

.bx-stalls { list-style: none; padding: 0 !important; margin: 24px 0 48px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.bx-stall { position: relative; border: 1px solid var(--theme-palette-color-5); border-radius: 14px; padding: 20px 20px 22px; background: var(--theme-palette-color-8); transition: transform .15s, box-shadow .15s, border-color .15s; }
.bx-stall:not(.is-soon):hover, .bx-stall:focus-within { transform: translateY(-2px); border-color: var(--theme-palette-color-1); box-shadow: 0 16px 32px -24px rgba(15, 39, 64, .7); }
.bx-stall:focus-within { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bx-stall h3 { margin: 10px 0 6px; font-size: 1.125rem; }
.bx-stall h3 a { color: var(--theme-palette-color-4); text-decoration: none; }
.bx-stall h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.bx-stall h3 a:focus-visible { outline: none; }
.bx-st-ic { width: 28px; height: 28px; fill: none; stroke: var(--theme-palette-color-1); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bx-st-n { display: block; font: 700 2rem/1.1 "Instrument Sans", sans-serif; font-stretch: 85%; font-variant-numeric: tabular-nums; color: var(--theme-palette-color-4); }
.bx-st-soon { display: inline-block; font: 500 .75rem/1 "Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px dashed var(--theme-palette-color-3); color: var(--theme-palette-color-3); }
.bx-stall p { margin: 8px 0 0; color: var(--theme-palette-color-3); font-size: .9375rem; }
.bx-stall.is-soon { background: transparent; border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .bx-stall { transition: none; } .bx-stall:hover, .bx-stall:focus-within { transform: none; } }

/* Exchange board: FAQs as threads */
.schema-faq { display: grid; gap: 12px; margin: 16px 0 24px; }
.schema-faq-section { border: 1px solid var(--theme-palette-color-5); border-left: 4px solid var(--theme-palette-color-1); border-radius: 12px; padding: 16px 18px; background: var(--theme-palette-color-8); }
.schema-faq-question { display: block; font-family: "Instrument Sans", sans-serif; font-size: 1.0625rem; color: var(--theme-palette-color-4); }
.schema-faq-question::before { content: "Q"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 6px; background: var(--theme-palette-color-1); color: var(--theme-palette-color-8); font: 600 .75rem/1 "Plex Mono", monospace; vertical-align: 2px; }
.schema-faq-answer { margin: 8px 0 0 34px; color: var(--theme-palette-color-3); }
.bx-ask { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; border: 1px dashed var(--theme-palette-color-1); border-radius: 14px; padding: 18px 20px; margin: 8px 0 32px; }
.bx-ask p { margin: 0; max-width: 60ch; }

/* figures and controls */
.bp-stats strong { font-variant-numeric: tabular-nums; }
.bx-field input, .bx-field select, .bx-field textarea { min-height: 48px; border-radius: 8px; font-size: 1rem; }
.bx-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.bx-btn { min-height: 48px; border-radius: 8px; }
/* town pages: zoomed town map with HTML labels, sortable table headers */
.bx-sw-cur, .bx-sw-nb, .bx-sw-other { display: inline-block; width: 16px; height: 12px; border: 1px solid var(--bp-line); }
.bx-sw-cur { background: var(--bx-hub); } .bx-sw-nb { background: color-mix(in srgb, var(--theme-palette-color-1) 18%, var(--bp-land)); } .bx-sw-other { background: var(--bp-land); }
.bx-sub { font-size: .875rem; color: var(--bx-muted, #4a6072); font-weight: 400; }
/* neighborhood maps and the population bar chart (single series: reference blue, validated light #2a78d6 / dark #3987e5) */
.bp-towns path.s1 { fill: var(--bp-s1); } .bp-towns path.s2 { fill: var(--bp-s2); } .bp-towns path.s3 { fill: var(--bp-s3); } .bp-towns path.s4 { fill: var(--bp-s4); }
.bp-towns path.s5 { fill: var(--bp-s5); } .bp-towns path.s6 { fill: var(--bp-s6); } .bp-towns path.s7 { fill: var(--bp-s7); }
.bp-towns path.bx-nd { fill: var(--bp-land); }
.bp-sw.bx-nd i { background: var(--bp-land); border: 1px solid var(--bp-line); }
.bx-chart, .bx-wide > .bx-chart { margin: 0; max-width: 540px !important; }
.bx-chart figcaption { text-align: left; }
.bx-chart svg { display: block; width: 100%; height: auto; }
.bx-ch-bar path { fill: #2a78d6; }
.bx-ch-bar:hover path { fill: #1c5cab; }
.bx-ch-grid { stroke: var(--theme-palette-color-5); stroke-width: 1; }
.bx-ch-ax { font: 500 12px "Plex Mono", ui-monospace, monospace; fill: var(--bx-muted, #4d6273); }
.bx-ch-val { font: 600 13px "Inter", sans-serif; fill: var(--theme-palette-color-4); font-variant-numeric: tabular-nums; }
.bx-chart figcaption { margin-top: 8px; font-size: .875rem; color: var(--bx-muted); }
.bx-ch-table { margin-top: 12px; }
.bx-ch-table summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--theme-palette-color-1); }
.bx-ch-table summary:focus-visible { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; border-radius: 4px; }
.bx-ch-table table { max-width: 360px; }
:root:where(:not([data-theme="light"])) .bx-ch-bar path { fill: #3987e5; } :root:where(:not([data-theme="light"])) .bx-ch-bar:hover path { fill: #5598e7; }
:root[data-theme="dark"] .bx-ch-bar path { fill: #3987e5; }

/* static town/neighborhood maps: no zoom hint (no zoom buttons there); phones label only the highlighted place */
@media (max-width: 600px) { .bx-ch-ax { font-size: 15px; } .bx-ch-val { font-size: 15px; } }
/* snow emergency routes (reference orange: light #eb6834, dark #d95926; validated on the map land colours) */
.bx-snow { fill: none; stroke: #eb6834; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bx-sw-snow { display: inline-block; width: 18px; height: 0 !important; border: 0 !important; border-top: 3px solid #eb6834 !important; }
:root:where(:not([data-theme="light"])) .bx-snow { stroke: #d95926; } :root:where(:not([data-theme="light"])) .bx-sw-snow { border-top-color: #d95926 !important; }
:root[data-theme="dark"] .bx-snow { stroke: #d95926; }

/* property tax line chart (tax.php): bill line in the validated blue (#2a78d6 / dark #5598e7), inflation reference dashed muted */
.bx-chart.bx-chart-line, .bx-wide > .bx-chart.bx-chart-line { max-width: 720px !important; }
.bx-ch-line { fill: none; stroke: #2a78d6; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.bx-ch-dot { fill: #2a78d6; stroke: var(--theme-palette-color-8, #fbfdfd); stroke-width: 1.5; }
.bx-ch-ref { fill: none; stroke: var(--bx-muted, #4d6273); stroke-width: 2; stroke-dasharray: 6 5; }
.bx-ch-key { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .875rem; color: var(--bx-muted, #4d6273); }
.bx-ch-key li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.bx-ch-key i { display: inline-block; width: 24px; height: 0; border-top: 3px solid #2a78d6; }
.bx-ch-key i.k-ref { border-top: 2px dashed var(--bx-muted, #4d6273); }
.bx-chart-line .bx-ch-table table { max-width: none; }
:root:where(:not([data-theme="light"])) .bx-ch-line { stroke: #5598e7; } :root:where(:not([data-theme="light"])) .bx-ch-dot { fill: #5598e7; } :root:where(:not([data-theme="light"])) .bx-ch-key i.k-line { border-top-color: #5598e7; }
:root[data-theme="dark"] .bx-ch-line { stroke: #5598e7; } :root[data-theme="dark"] .bx-ch-dot { fill: #5598e7; } :root[data-theme="dark"] .bx-ch-key i.k-line { border-top-color: #5598e7; }
.bx-chart-line .bx-ch-sm { display: none; }
@media (max-width: 599px) { .bx-chart-line .bx-ch-lg { display: none; } .bx-chart-line .bx-ch-sm { display: block; } }

/* school map measure picker */
.bx-sch-pick { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bx-sch-pick[hidden] { display: none; }
.bx-sch-pick legend { font-weight: 600; margin-bottom: 8px; padding: 0; width: 100%; color: var(--theme-palette-color-4); }
.bx-sch-pick label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--theme-palette-color-5); border-radius: 8px; background: var(--theme-palette-color-8, #fbfdfd); cursor: pointer; font-size: .9375rem; }
.bx-sch-pick label:has(input:checked) { border-color: var(--theme-palette-color-1); box-shadow: inset 0 0 0 1px var(--theme-palette-color-1); font-weight: 600; }
.bx-sch-pick input { accent-color: var(--theme-palette-color-1); width: 18px; height: 18px; margin: 0; }
.bx-sch-pick input:focus-visible { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bx-sch-leg[hidden] { display: none; }
.bp-legend .bx-sch-leg { display: flex; flex-wrap: wrap; align-items: center; gap: inherit; width: 100%; }
.bp-legend .bx-sch-leg[hidden] { display: none; }
.bx-sch-pick { align-items: flex-start; } .bx-sch-pick label { white-space: nowrap; line-height: 1.2; }
.bx-hatch-bg { fill: var(--bp-land); } .bx-hatch-ln { stroke: var(--bp-line); stroke-width: 1.5; }
.bp-sw.bx-nd i { background: repeating-linear-gradient(45deg, var(--bp-land) 0 3px, var(--bp-line) 3px 4.5px); }

/* MBTA Communities status map: categorical, from the validated venue-kind palette (green / blue / orange) */
.bp-towns path.k-ok { fill: var(--bp-k-arts); } .bp-towns path.k-rev { fill: var(--bp-k-stage); } .bp-towns path.k-no { fill: var(--bp-k-music); }
.bp-sw.k-ok i { background: var(--bp-k-arts); } .bp-sw.k-rev i { background: var(--bp-k-stage); } .bp-sw.k-no i { background: var(--bp-k-music); }

/* header dropdowns (Primary menu: Places / Living): above the ticker, card style; mobile panel opaque */
#header { position: relative; z-index: 60; }
#header [data-id="menu"] .sub-menu { z-index: 1000; background: var(--theme-palette-color-8, #fbfdfd); border: 1px solid var(--theme-palette-color-5); border-radius: 8px; box-shadow: 0 16px 32px -16px rgba(15, 39, 64, .35); padding: 6px 0; min-width: 260px; }
#header [data-id="menu"] .sub-menu .ct-menu-link { color: var(--theme-palette-color-4); padding-top: 10px; padding-bottom: 10px; min-height: 44px; }
#header [data-id="menu"] .sub-menu .ct-menu-link:hover, #header [data-id="menu"] .sub-menu .ct-menu-link:focus-visible { color: var(--theme-palette-color-1); background: color-mix(in srgb, var(--theme-palette-color-1) 8%, transparent); }
#header [data-id="menu"] .sub-menu li + li { border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 60%, transparent); }
#offcanvas { z-index: 9999; } #offcanvas.ct-panel .ct-panel-inner { background-color: #0f2740 !important; }
:root:where(:not([data-theme="light"])) #offcanvas.ct-panel .ct-panel-inner { background-color: #0f1d2a !important; }
:root[data-theme="dark"] #offcanvas.ct-panel .ct-panel-inner { background-color: #0f1d2a !important; }
#offcanvas [class*="current-menu-"] > .ct-sub-menu-parent > .ct-menu-link, #offcanvas [class*="current-menu-"] > .ct-menu-link, #offcanvas [class*="current-menu-"] > .ct-sub-menu-parent .ct-toggle-dropdown-mobile, #offcanvas [class*="current-menu-"] > .ct-toggle-dropdown-mobile { color: #5cc8d0 !important; }

/* Freedom Trail map (colours: reference orange for the trail as on the snow map; pins in the accent colour) */
.bx-ftmap .bx-ft-land path { fill: var(--bp-land); stroke: var(--bp-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bx-ftmap .bp-svg { background: var(--bp-water); }
.bx-ftmap .bx-ft-park path { fill: color-mix(in srgb, #5aa469 22%, var(--bp-land)); stroke: none; }
.bx-ftmap .bx-ft-road path, .bx-ftmap .bx-ft-trail path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bx-ftmap .bx-ft-road path { stroke: var(--bp-line); stroke-width: .8; opacity: .7; }
.bx-ftmap .bx-ft-major path { stroke-width: 1.6; opacity: .9; }
.bx-ftmap .bx-ft-trail path { stroke: #eb6834; stroke-width: 3.2; }
.bx-ftmap .bx-ft-lead { stroke: var(--bp-ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.bx-ftmap .bx-ft-dot { fill: var(--bp-ink); }
.bx-ftmap .bx-ft-pin { fill: #0b6e78; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.bx-ftmap .bx-ft-num { fill: #fff; font: 600 24px/1 "IBM Plex Mono", ui-monospace, monospace; }
.bx-ftmap a:focus-visible .bx-ft-pin { stroke: var(--bp-focus); stroke-width: 4; }
.bx-ft-list { margin: 12px 0 0; padding-left: 1.6em; font-size: .9375rem; columns: 1; }
.bx-ft-list li { margin: 0; padding: 2px 0; }
.bx-sw-ft { display: inline-block; width: 18px; height: 0 !important; border: 0 !important; border-top: 3px solid #eb6834 !important; }
.bx-sw-ftpin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: #0b6e78; border: 0 !important; }
:root:where(:not([data-theme="light"])) .bx-ftmap .bx-ft-trail path { stroke: #ff8a5c; } :root:where(:not([data-theme="light"])) .bx-ftmap .bx-ft-pin { fill: #5cc8d0; stroke: #08121b; } :root:where(:not([data-theme="light"])) .bx-ftmap .bx-ft-num { fill: #08121b; } :root:where(:not([data-theme="light"])) .bx-sw-ft { border-top-color: #ff8a5c !important; } :root:where(:not([data-theme="light"])) .bx-sw-ftpin { background: #5cc8d0; }
:root[data-theme="dark"] .bx-ftmap .bx-ft-trail path { stroke: #ff8a5c; } :root[data-theme="dark"] .bx-ftmap .bx-ft-pin { fill: #5cc8d0; stroke: #08121b; } :root[data-theme="dark"] .bx-ftmap .bx-ft-num { fill: #08121b; } :root[data-theme="dark"] .bx-sw-ft { border-top-color: #ff8a5c !important; } :root[data-theme="dark"] .bx-sw-ftpin { background: #5cc8d0; }
@media (max-width: 999px) { .bx-ftmap .bx-ft-list { display: none; } }

/* Area code map: orange 617, blue 781, green 978 (validated slots 2, 1, 3); 508 is hatched (a fourth colour fails the all-pairs choropleth check) */
.bp-towns path.ac-617 { fill: var(--bp-k-music); } .bp-towns path.ac-781 { fill: var(--bp-k-stage); } .bp-towns path.ac-978 { fill: var(--bp-k-arts); }
.bp-sw.ac-617 i { background: var(--bp-k-music); } .bp-sw.ac-781 i { background: var(--bp-k-stage); } .bp-sw.ac-978 i { background: var(--bp-k-arts); }

/* flood maps (flood.php): nested sea-level scenarios, CSS-only switch (works without JavaScript; without :has() all three stay shown).
   Blues on the map land: light 9 in. #0a2f6e, 21 in. #2b6cc4, 36 in. #8fb8ea (+ outline); dark 9 in. #cfe3ff, 21 in. #7fb0f0, 36 in. #3f78c9 */
.bx-floodmap { --fl9: #b3cff0; --fl21: #4f8ad0; --fl36: #0a2f6e; --fl-line: #2b6cc4; } /* more sea-level rise = darker, both modes */
.bx-fl { pointer-events: none; stroke: var(--fl-line); stroke-width: .6; }
.bx-fl path { vector-effect: non-scaling-stroke; }
.bx-fl9 { fill: var(--fl9); } .bx-fl21 { fill: var(--fl21); } .bx-fl36 { fill: var(--fl36); }
.bx-fl-sw { display: inline-block; width: 16px; height: 12px; border: 1px solid var(--bp-line); }
.bx-fl-sw9 { background: var(--fl9); } .bx-fl-sw21 { background: var(--fl21); } .bx-fl-sw36 { background: var(--fl36); }
.bx-flsw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; margin: 0 0 12px; padding: 0; }
.bx-flsw legend { float: left; padding: 0 8px 0 0; font-weight: 600; font-size: .9375rem; line-height: 44px; }
.bx-flr { position: relative; display: inline-flex; }
.bx-flr input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bx-flr span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--bp-line); border-radius: 8px; background: var(--bp-surface); font-size: .9375rem; font-weight: 500; }
.bx-flr input:checked + span { background: var(--bp-ink); border-color: var(--bp-ink); color: var(--bp-surface); }
.bx-flr input:focus-visible + span { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bx-floodmap:has(input[value="9"]:checked) .bx-fl21, .bx-floodmap:has(input[value="9"]:checked) .bx-fl36,
.bx-floodmap:has(input[value="21"]:checked) .bx-fl9, .bx-floodmap:has(input[value="21"]:checked) .bx-fl36,
.bx-floodmap:has(input[value="36"]:checked) .bx-fl9, .bx-floodmap:has(input[value="36"]:checked) .bx-fl21 { display: none; }
.bx-fl-plans { margin: 0 0 1em; }
:root:where(:not([data-theme="light"])) .bx-floodmap, :root[data-theme="dark"] .bx-floodmap { --fl9: #9bbbe0; --fl21: #4f86cc; --fl36: #1a4a96; --fl-line: #b9d4f5; }

/* Print: checklist pages (and any page) print as plain black on white, without navigation, rail, ticker or ads. */
@media print {
  header, footer, nav, .bx-rail, .bx-toc, .bx-ticker, .ct-back-to-top, .bx-crumbs, .adsbygoogle, #wpadminbar { display: none !important; }
  body, .bx-band, .bx-main { background: #fff !important; color: #000 !important; }
  .bx-band, .bx-main, .bx-layout { width: auto !important; max-width: none !important; padding: 0 !important; float: none !important; }
  a { color: #000 !important; text-decoration: underline; }
  table, tr, li { break-inside: avoid; }
  h2 { break-after: avoid; }
}

/* Colour ramps, owner Nov 22: more = darker in both modes (s1 = least ... s4 = most). Dark mode: s1 a muted pale blue that
   stays visible against the land/water tokens, s4 a deep saturated blue with a light border so it never merges with the page.
   Higher specificity than boston-places (shared with the paused theater site, which is left alone). */
html:root[data-theme="dark"] :is(.bp-map, .bp-list, .bp-stats, .bp-chains), html:root:where(:not([data-theme="light"])) :is(.bp-map, .bp-list, .bp-stats, .bp-chains) { --bp-s1: #9bbbe0; --bp-s2: #5f95d3; --bp-s3: #2f6cbd; --bp-s4: #1a4a96; --bp-s4-edge: #b9d4f5; }
:root[data-theme="dark"] .bp-map:not(.bx-q7) .bp-towns path.s4, :root:where(:not([data-theme="light"])) .bp-map:not(.bx-q7) .bp-towns path.s4 { stroke: var(--bp-s4-edge, #b9d4f5) !important; stroke-width: .8 !important; }
:root[data-theme="dark"] .bp-map:not(.bx-q7) .bp-sw.s4 i, :root:where(:not([data-theme="light"])) .bp-map:not(.bx-q7) .bp-sw.s4 i { border: 1px solid var(--bp-s4-edge, #b9d4f5); }
.bp-sw.s1 i, .bp-sw.s2 i, .bp-sw.s3 i { border: 1px solid var(--bp-line); }
/* 7k step A (owner Nov 23): seven quantile classes, blue only, more = darker in both modes (maps with .bx-q7; the older 4-class maps keep s1-s4).
   Neighbouring steps are >= 11 apart in CIE76 delta E in light and >= 9 in dark (7.2 / 7.4 in CIEDE2000), measured in tools/bx_ramp_check.py.
   Dark: the darkest class gets a light edge so it never merges with the page. */
html:root .bp-map.bx-q7 { --bp-s1: #d6e0f2; --bp-s2: #b0c5e7; --bp-s3: #8aabd9; --bp-s4: #5b8fca; --bp-s5: #0474bb; --bp-s6: #00599f; --bp-s7: #003b76; }
html:root[data-theme="dark"] .bp-map.bx-q7, html:root:where(:not([data-theme="light"])) .bp-map.bx-q7 { --bp-s1: #c6d5ee; --bp-s2: #a1bae1; --bp-s3: #7aa0d3; --bp-s4: #4d87c5; --bp-s5: #166eb0; --bp-s6: #005692; --bp-s7: #003f72; --bp-s7-edge: #b9d4f5; }
.bp-sw.s5 i { background: var(--bp-s5); } .bp-sw.s6 i { background: var(--bp-s6); } .bp-sw.s7 i { background: var(--bp-s7); }
.bp-map.bx-q7 .bx-steps .bp-sw i { border: 1px solid var(--bp-line); }
:root[data-theme="dark"] .bp-map.bx-q7 .bp-towns path.s7, :root:where(:not([data-theme="light"])) .bp-map.bx-q7 .bp-towns path.s7 { stroke: var(--bp-s7-edge) !important; stroke-width: .8 !important; }
:root[data-theme="dark"] .bp-map.bx-q7 .bp-sw.s7 i, :root:where(:not([data-theme="light"])) .bp-map.bx-q7 .bp-sw.s7 i { border: 1px solid var(--bp-s7-edge); }

/* ===== Map frame (owner Nov 22, DESIGN-SYSTEM.md "Map format"; includes/mapframe.php, assets/bx-map.js) =====
   Wide, short viewport: height = the screen minus the sticky header, the legend rows and the notes, never taller than 64% of the
   width (landscape) so map + buttons + legend + notes fit together on 1280x720 up to 1920x1080 and 820x1180. */
.bx-frame { --bx-fh: clamp(250px, calc(100svh - 80px - 205px), 640px); --bx-px: .5; margin-block: 1.25em; display: block !important; }
.bx-frame .bp-box { width: 100% !important; max-width: none; height: min(var(--bx-fh), 64vw); margin: 0 !important; }
.bx-frame .bp-svg { width: 100%; height: 100%; max-height: none; }
@media (max-width: 600px) { .bx-frame .bp-box { height: min(70svh, 430px); } }
/* base layer: Massachusetts towns outside the page's area, faint; state outline above */
.bx-frame { --bx-ctx-fill: color-mix(in srgb, var(--bp-land) 62%, var(--bp-water)); --bx-ctx-line: color-mix(in srgb, var(--bp-line) 55%, transparent); --bx-state-line: var(--bp-ink); --bx-halo: var(--bp-surface); }
.bx-frame .bx-ctx-fill { fill: var(--bx-ctx-fill); stroke: var(--bx-ctx-line); stroke-width: .7px; stroke-linejoin: round; pointer-events: none; }
.bx-frame .bx-state { fill: none; stroke: var(--bx-state-line); stroke-opacity: .75; stroke-width: 1.6px; stroke-linejoin: round; pointer-events: none; }
/* data layer: classes colour the fills; the lines come from the overlay (light casing + dark line, >= 3:1 on every fill) */
.bx-frame .bp-towns path { stroke: none; }
.bx-frame .bp-towns path.bx-base { fill: var(--bp-land); }
.bx-frame .bp-towns path:hover, .bx-frame .bp-towns a:focus path { filter: brightness(1.12) saturate(1.15); stroke: var(--bp-ink); stroke-width: 2.4px; }
#bx-zip-map .bp-towns path { stroke: color-mix(in srgb, var(--bp-ink) 40%, transparent); stroke-width: .6px; }
#bx-zip-map .bp-towns path:hover { stroke: var(--bp-ink); stroke-width: 2.4px; }
.bx-frame .bx-ln-case, .bx-frame .bx-ln { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.bx-frame .bx-ln-case { stroke: var(--bp-surface); stroke-width: 3.4px; stroke-opacity: .8; }
.bx-frame .bx-ln { stroke: var(--bp-ink); stroke-width: 1.3px; }
.bx-frame .bx-lines path { vector-effect: non-scaling-stroke; }
.bx-frame .bx-lines, .bx-frame .bx-ctx { pointer-events: none; }
/* labels: JavaScript sets the size (12px on screen) and which ones fit; halo for contrast on every fill */
.bx-frame .bx-labels { visibility: hidden; font: 600 calc(12px * var(--bx-px)) "Inter", sans-serif; pointer-events: none; }
.bx-frame.is-js .bx-labels { visibility: visible; }
.bx-frame .bx-labels text { text-anchor: middle; dominant-baseline: central; fill: var(--bp-ink); stroke: var(--bx-halo); stroke-width: calc(4px * var(--bx-px)); stroke-linejoin: round; paint-order: stroke fill; }
.bx-frame .bx-labels text.is-off { display: none; }
.bx-frame .bx-labels.is-measure text.is-off { display: inline; }
/* legend and notes below the map, in rows; titles in the body font */
.bx-fleg { margin-top: 10px; }
.bx-fleg-t { margin: 0 0 6px; font: 600 .9375rem/1.3 "Inter", sans-serif; color: var(--bp-ink); }
.bx-fleg .bp-legend { margin-top: 0; gap: 8px 12px; }
.bx-frame .bp-legend-t { font-family: "Inter", sans-serif; }
.bx-swb { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px 4px 8px; border: 1px solid var(--bp-rule); border-radius: 8px; background: var(--bp-surface); color: var(--bp-ink); font: 500 .875rem/1.2 "Inter", sans-serif; cursor: pointer; }
.bx-swb:hover { border-color: var(--bp-ink); }
.bx-swb[aria-expanded="true"] { border-color: var(--bp-focus); box-shadow: 0 0 0 2px var(--bp-focus); }
.bx-swb:focus-visible, .bx-pick :focus-visible, .bx-reset:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bx-swb i, .bx-fleg .bp-sw i { width: 22px; height: 16px; border-radius: 3px; flex: none; }
.bx-fleg .bp-sw.bx-base i { background: var(--bp-land); border: 1px solid var(--bp-line); }
.bx-fleg .bp-sw.bx-ctxsw i { background: var(--bx-ctx-fill); border: 1px solid var(--bp-line); }
.bx-fleg .bp-sw.bx-nd i { background: repeating-linear-gradient(45deg, var(--bp-land) 0 3px, var(--bp-line) 3px 4.5px); }
.bx-fleg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: 100%; margin-top: 2px; }
.bx-fleg-hint { font-size: .875rem; color: var(--bp-muted); }
.bx-reset { min-height: 36px !important; padding: 4px 14px !important; font-size: .875rem; }
.bx-reset:disabled { opacity: .55; cursor: default; }
.bx-pick { width: 100%; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--bp-rule); border-radius: 10px; background: var(--bp-surface); font-size: .9375rem; }
.bx-pick[hidden] { display: none; }
.bx-pick-h { margin: 0 0 8px; font-weight: 600; }
.bx-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.bx-pick label { display: inline-flex; align-items: center; gap: 8px; }
.bx-pick input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--bp-rule); border-radius: 6px; background: transparent; cursor: pointer; }
.bx-pick .bx-btn { min-height: 36px; padding: 4px 14px; font-size: .875rem; }
.bp-map.bx-frame figcaption { margin-top: 8px; font-size: .875rem; }
@media (pointer: coarse) { .bx-frame .bp-legend::after { content: none !important; } }
@media (max-width: 700px) { .bx-frame .bp-tools { top: 6px; right: 6px; gap: 4px; } .bx-frame .bp-tools button { min-width: 40px !important; min-height: 40px !important; padding: 0 8px; font-size: .875rem; } }
/* the fixed swatch tokens are not clickable (town line) */
.bx-lnsw { padding: 0 4px; }

/* ===== Map frame, part 2 (owner Nov 22): legend as a compact panel inside the map (>= 820px) or under it (phones), segmented layer control,
   map title line + watermark inside the SVG, full screen. One group, never at opposite edges. ===== */
.bx-frame { --bx-fh: clamp(250px, calc(100svh - 80px - 140px), 640px); display: grid !important; grid-template-columns: minmax(0, 1fr); margin-inline: auto; }
.bx-frame:has(> .bx-flsw), .bx-frame:has(> .bx-sch-pick) { --bx-fh: clamp(250px, calc(100svh - 80px - 200px), 640px); }
.bx-frame > * { grid-column: 1; min-width: 0; }
.bx-frame > .bx-flsw, .bx-frame > .bx-sch-pick { grid-row: 1; }
.bx-frame > .bx-fbox { grid-row: 2; }
.bx-frame > .bx-fleg { grid-row: 2; align-self: end; justify-self: start; z-index: 3; width: max-content; max-width: min(580px, 72%); margin: 0 0 10px 10px; padding: 6px 12px 8px; max-height: calc(var(--bx-fh) * .62); overflow: auto;
  background: color-mix(in srgb, var(--bp-surface) 90%, transparent); border: 1px solid var(--bp-rule); border-radius: 10px; backdrop-filter: blur(2px); }
.bx-frame > figcaption { grid-row: 3; }
.bx-fleg-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.bx-steps { display: flex; gap: 2px; margin: 2px 0 6px; min-width: 260px; }
.bx-steps .bp-sw, .bx-steps .bx-swb { flex: 1 1 0; min-width: 76px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; margin: 0; padding: 0; min-height: 0; border: 0; border-radius: 0; background: none; text-align: left; font: inherit; color: var(--bp-ink); }
.bx-steps .bp-sw { display: block; }
.bx-steps .bx-swb { width: 100%; cursor: pointer; }
.bx-steps .bp-sw i, .bx-steps .bx-swb i { display: block; width: auto !important; height: 14px !important; border-radius: 0; border: 1px solid color-mix(in srgb, var(--bp-ink) 35%, transparent); }
.bx-steps .bp-sw:first-child i, .bx-steps .bx-swb:first-child i { border-radius: 5px 0 0 5px; } .bx-steps .bp-sw:last-child i { border-radius: 0 5px 5px 0; }
.bx-steps .bx-sl { font-size: .875rem; line-height: 1.2; color: var(--bp-ink); }
.bx-steps .bx-swb:hover i, .bx-steps .bx-swb[aria-expanded="true"] i { outline: 2px solid var(--bp-focus); outline-offset: 1px; }
.bx-steps .bx-swb:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bx-fleg-x { gap: 4px 10px !important; align-items: center; }
.bx-fleg-x .bx-swb { min-height: 28px; padding: 2px 8px 2px 6px; gap: 6px; font-size: .875rem; border-radius: 6px; }
.bx-fleg-x .bp-sw { font-size: .875rem; gap: 6px; }
.bx-fleg-x .bx-sl { font-size: .875rem; }
.bx-fleg-x .bx-swb i, .bx-fleg-x .bp-sw i { width: 18px; height: 12px; }
.bx-leg-toggle { display: none; margin: 0 0 4px; padding: 2px 10px; min-height: 28px; border: 1px solid var(--bp-rule); border-radius: 6px; background: var(--bp-surface); color: var(--bp-ink); font: 600 .875rem/1 "Inter", sans-serif; cursor: pointer; }
.bx-leg-toggle::after { content: " \25BE"; } .bx-leg-toggle[aria-expanded="false"]::after { content: " \25B8"; }
.bx-fleg-bar { margin-top: 4px; }
.bx-fleg .bx-reset { min-height: 28px !important; padding: 2px 10px !important; font-size: .875rem; }
.bx-fleg-hint { display: none; }
@media (min-width: 820px) {
  .bx-frame > .bx-fleg { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
  .bx-fleg > .bx-steps, .bx-fleg > .bx-sch-leg { order: 1; flex: 1 1 100%; } .bx-fleg > .bx-leg-toggle { order: 2; margin: 0; } .bx-fleg > .bx-fleg-x { order: 3; flex: 1 1 auto; margin: 0; } .bx-fleg > .bx-fleg-bar { order: 4; width: auto; margin: 0; } .bx-fleg > .bx-pick { order: 5; }
  .bx-sch-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; } .bx-sch-leg[hidden] { display: none; } .bx-sch-leg > .bx-steps { flex: 1 1 100%; } .bx-sch-leg > .bx-fleg-x { flex: 1 1 auto; margin: 0; }
  .bx-leg-toggle { display: inline-flex; align-items: center; }
  .bx-fleg.is-collapsed > :not(.bx-leg-toggle) { display: none; }
}
@media (max-width: 819px) {
  .bx-frame { --bx-fh: clamp(250px, calc(100svh - 80px - 215px), 640px); }
  .bx-frame > .bx-fleg { grid-row: 3; justify-self: stretch; width: auto; max-width: none; max-height: none; margin: 8px 0 0; padding: 4px 0; background: none; border: 0; backdrop-filter: none; overflow: visible; }
  .bx-frame > figcaption { grid-row: 4; }
  .bx-fleg-hint { display: inline; }
}
/* caption: one short source line, the long method note behind a disclosure */
.bx-frame figcaption { margin-top: 6px; }
.bx-src { font-size: .875rem; }
.bx-method { display: inline-block; vertical-align: top; }
.bx-method summary { cursor: pointer; font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; min-height: 28px; }
.bx-method[open] { display: block; margin-top: 4px; }
.bx-method > div { font-size: .875rem; margin-top: 4px; }
/* layer switcher: one segmented control above the map */
.bx-frame .bx-sch-pick, .bx-frame .bx-flsw { display: inline-flex; flex-wrap: wrap; gap: 0; justify-self: start; margin: 0 0 8px; padding: 0; border: 1px solid var(--bp-rule); border-radius: 10px; overflow: hidden; background: var(--bp-surface); float: none; }
.bx-frame .bx-sch-pick[hidden] { display: none; }
.bx-frame .bx-sch-pick legend, .bx-frame .bx-flsw legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; float: none; }
.bx-frame .bx-sch-pick label, .bx-frame .bx-flr { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; margin: 0; font-size: .875rem; font-weight: 500; cursor: pointer; border-right: 1px solid var(--bp-rule); border-bottom: 1px solid var(--bp-rule); margin-bottom: -1px; margin-right: -1px; }
.bx-frame .bx-sch-pick input, .bx-frame .bx-flr input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bx-frame .bx-sch-pick label:has(input:checked), .bx-frame .bx-flr:has(input:checked) { background: var(--bp-ink); color: var(--bp-surface); }
.bx-frame .bx-sch-pick label:focus-within, .bx-frame .bx-flr:focus-within { outline: 3px solid var(--bp-focus); outline-offset: -3px; }
.bx-frame .bx-flr span { min-height: 0; padding: 0; border: 0; background: none; font-size: inherit; color: inherit; display: inline; }
.bx-frame .bx-flr input:checked + span { background: none; color: inherit; }
.bx-floodmap:has(input[value="9"]:checked) .bp-sw.bx-fl21, .bx-floodmap:has(input[value="9"]:checked) .bp-sw.bx-fl36,
.bx-floodmap:has(input[value="21"]:checked) .bp-sw.bx-fl9, .bx-floodmap:has(input[value="21"]:checked) .bp-sw.bx-fl36,
.bx-floodmap:has(input[value="36"]:checked) .bp-sw.bx-fl9, .bx-floodmap:has(input[value="36"]:checked) .bp-sw.bx-fl21 { display: none; }
/* map title line and watermark live inside the SVG (a screenshot or saved image carries them); JavaScript keeps them in the corners */
.bx-frame .bx-wm, .bx-frame .bx-mt { pointer-events: none; fill: var(--bp-ink); stroke: var(--bx-halo); stroke-linejoin: round; paint-order: stroke fill; font-family: "Inter", sans-serif; user-select: none; }
.bx-frame .bx-wm { font-size: calc(12.5px * var(--bx-px)); font-weight: 600; text-anchor: end; fill-opacity: .85; stroke-width: calc(4px * var(--bx-px)); stroke-opacity: .85; }
.bx-frame .bx-mt { font-size: calc(14px * var(--bx-px)); font-weight: 700; text-anchor: start; stroke-width: calc(4px * var(--bx-px)); }
/* kinds of layers */
.bx-frame .bp-towns path.bx-cur { fill: var(--bx-hub); }
.bx-frame .bp-towns path.bx-nb { fill: color-mix(in srgb, var(--theme-palette-color-1) 28%, var(--bp-land)); }
.bx-fleg .bp-sw.bx-cur i { background: var(--bx-hub); } .bx-fleg .bp-sw.bx-nb i { background: color-mix(in srgb, var(--theme-palette-color-1) 28%, var(--bp-land)); }
.bx-fleg .bp-sw.bx-fl9 i { background: var(--fl9); } .bx-fleg .bp-sw.bx-fl21 i { background: var(--fl21); } .bx-fleg .bp-sw.bx-fl36 i { background: var(--fl36); }
.bx-frame .bx-lt-ctx, .bx-frame .bx-labels text.bx-lt-ctx { font-style: italic; fill: var(--bp-muted); }
.bx-frame svg[style*="--bx-k"] .bx-ctx-fill { stroke-width: calc(.8px * var(--bx-px) / var(--bx-k)); }
.bx-frame svg[style*="--bx-k"] .bx-state { stroke-width: calc(1.6px * var(--bx-px) / var(--bx-k)); }
.bx-frame .bx-ctx-fill path { vector-effect: non-scaling-stroke; }
.bx-dot { fill: var(--bp-k-cinema); stroke: var(--bp-surface); stroke-width: 1.5px; vector-effect: non-scaling-stroke; r: calc(6px * var(--bx-px)); cursor: pointer; }
.bx-over a:hover .bx-dot, .bx-over a:focus .bx-dot { stroke: var(--bp-ink); stroke-width: 2.5px; }
.bx-over a:focus { outline: none; } .bx-over a:focus-visible .bx-dot, .bx-over a:focus-visible .bx-ft-pin { stroke: var(--bp-focus); stroke-width: 3px; }
.bx-sw-dot { display: inline-block; width: 14px !important; height: 14px !important; border-radius: 50% !important; background: var(--bp-k-cinema); }
.bx-ftmap .bx-ft-pin { r: calc(13px * var(--bx-px)); }
.bx-ftmap .bx-ft-dot { r: calc(4px * var(--bx-px)); }
.bx-ftmap .bx-ft-num { font: 700 calc(14px * var(--bx-px)) "Inter", sans-serif; dominant-baseline: central; text-anchor: middle; pointer-events: none; }
.bx-ftmap .bx-ft-trail path { stroke-width: 3px; vector-effect: non-scaling-stroke; }
.bx-ftmap .bx-ft-lead { vector-effect: non-scaling-stroke; }
.bx-snowmap .bx-routes .bx-snow { stroke-width: 2.4px; }
.bx-frame .bx-over { }
/* full screen: the whole figure (map, buttons, legend) scaled to the screen; fixed overlay where the API is missing */
.bx-fsbtn { white-space: nowrap; }
.bx-frame.is-fs { height: 100vh; height: 100dvh; width: 100%; margin: 0; padding: 10px 14px; box-sizing: border-box; overflow: auto; background: var(--bp-surface); color: var(--bp-ink); grid-template-rows: auto minmax(0, 1fr) auto auto; }
.bx-frame.is-fs-fb { position: fixed; inset: 0; z-index: 100000; }
.bx-frame.is-fs > .bx-fbox { height: auto !important; min-height: 220px; }
.bx-frame.is-fs > .bx-fbox .bp-svg { height: 100%; }
.bx-frame.is-fs > .bx-fleg { max-height: 40%; }
@media (max-width: 819px) { .bx-frame.is-fs > .bx-fleg { max-height: none; } }
html.bx-fs-lock, html.bx-fs-lock body { overflow: hidden; }
.bx-frame .bx-over .bx-hit { r: calc(13px * var(--bx-px)); fill: transparent !important; stroke: none !important; pointer-events: all; }

/* ===== 7k step B (owner Nov 23, MAP-PORT-PLAN 5-6): data maps (.bx-q7) in the contact.doctor style. Panel BESIDE the map from 900px
   (below on phones and narrow tablets), more visible town lines, hover card, selected ring, 44px controls, 7-step legend that lays out at 390px.
   Step C (JS) fills `.bx-panel` (title .bx-pn-t, big number .bx-pn-big, sub line .bx-pn-sub, bars .bx-pn-bar > i[style=--w:NN%], lists .bx-pn-list,
   actions .bx-acts > .bx-act), marks the selection `.is-sel` on the path, and fills `.bp-tip` with .bx-hc-n / .bx-hc-v / .bx-hc-r. Until then the empty panel
   shows a hint (pseudo element, only with JS: without JS the map keeps the full width). ===== */
.bx-frame:is(.bx-q7, .bx-cat) { --bx-pw: 312px; --bx-mh: min(var(--bx-fh), 64vw); }
/* more visible lines: ink line 1.6px over a surface casing, ZIP lines 0.9px at 60% */
.bx-frame:is(.bx-q7, .bx-cat) .bx-ln { stroke-width: 1.6px; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-ln-case { stroke-width: 3.6px; stroke-opacity: .85; }
#bx-zip-map.bx-q7 .bp-towns path { stroke: color-mix(in srgb, var(--bp-ink) 60%, transparent); stroke-width: .9px; }
/* hover and selected (click) */
.bx-frame:is(.bx-q7, .bx-cat) .bp-towns path { cursor: pointer; }
.bx-frame:is(.bx-q7, .bx-cat) .bp-towns path:hover, .bx-frame:is(.bx-q7, .bx-cat) .bp-towns a:focus path { filter: brightness(1.1) saturate(1.1); stroke: var(--bp-ink); stroke-width: 2.4px; stroke-opacity: 1; }
.bx-frame:is(.bx-q7, .bx-cat) .bp-towns path.is-sel, #bx-zip-map.bx-q7 .bp-towns path.is-sel { stroke: var(--bp-ink); stroke-width: 3.4px; stroke-opacity: 1; filter: drop-shadow(0 0 2px var(--bp-surface)) drop-shadow(0 0 1px var(--bp-surface)); }
.bx-frame:is(.bx-q7, .bx-cat) .bp-towns path.is-sel:hover { filter: drop-shadow(0 0 2px var(--bp-surface)); }
/* hover card */
.bx-frame:is(.bx-q7, .bx-cat) .bp-tip { min-width: 150px; max-width: 280px; padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.28); font: 400 .875rem/1.35 "Inter", sans-serif; }
.bx-hc-n { display: block; font-weight: 700; font-size: .9375rem; }
.bx-hc-v { display: block; font-variant-numeric: tabular-nums; }
.bx-hc-r { display: block; color: var(--bp-muted); }
/* controls >= 44px (zoom, view buttons, full screen, legend toggle and reset, Download image, Share) */
.bx-frame:is(.bx-q7, .bx-cat) .bp-tools button, .bx-frame:is(.bx-q7, .bx-cat) .bx-fsbtn { min-width: 44px !important; min-height: 44px !important; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-leg-toggle, .bx-frame:is(.bx-q7, .bx-cat) .bx-fleg .bx-reset, .bx-frame:is(.bx-q7, .bx-cat) .bx-fleg-x .bx-swb { min-height: 44px !important; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-fleg-x .bp-sw { min-height: 28px; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-method summary { min-height: 44px; display: inline-flex; align-items: center; }
.bx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.bx-act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 8px 16px; border: 1px solid var(--bp-rule); border-radius: 8px; background: var(--bp-surface); color: var(--bp-ink); font: 600 .9375rem/1.2 "Inter", sans-serif; cursor: pointer; }
.bx-act:hover { border-color: var(--bp-ink); }
.bx-act:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bx-act[aria-busy="true"], .bx-act:disabled { opacity: .6; cursor: default; }
/* 7-step legend: seven equal cells (swatch over label, label wraps at "to") from 820px inside the map; two columns of swatch + label on phones */
.bx-frame:is(.bx-q7, .bx-cat) .bx-steps { display: grid; grid-template-columns: repeat(7, minmax(54px, 1fr)); gap: 2px; min-width: 0; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bp-sw, .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bx-swb { min-width: 0; overflow-wrap: anywhere; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bx-swb { min-height: 44px; }
.bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bx-sl { font-variant-numeric: tabular-nums; }
@media (max-width: 819px) {
  .bx-frame:is(.bx-q7, .bx-cat) .bx-steps { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 4px 10px; }
  .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bp-sw, .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bx-swb { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
  .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bp-sw { display: flex; }
  .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bp-sw i, .bx-frame:is(.bx-q7, .bx-cat) .bx-steps .bx-swb i { flex: none; width: 28px !important; height: 20px !important; border-radius: 4px !important; }
  .bx-frame:is(.bx-q7, .bx-cat) .bp-tools { top: 6px; right: 6px; gap: 6px; }
  .bx-frame:is(.bx-q7, .bx-cat) .bp-tools button { min-width: 44px !important; min-height: 44px !important; }
}
/* details panel: beside the map from 900px (same height as the map, scrolls inside), below it on phones and narrow tablets */
.bx-panel, .bx-frame:is(.bx-q7, .bx-cat).is-js:not(:has(> .bx-panel))::after { box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--bp-rule); border-radius: 10px; background: var(--bp-surface); color: var(--bp-ink); font: 400 .9375rem/1.4 "Inter", sans-serif; overflow: auto; }
.bx-frame:is(.bx-q7, .bx-cat).is-js:not(:has(> .bx-panel))::after { content: "Hover for a quick look, click a place for its details."; color: var(--bp-muted); }
.bx-pn-t { margin: 0 0 4px; font: 700 1.125rem/1.25 "Inter", sans-serif; }
.bx-pn-big { margin: 0; font: 700 2rem/1.1 "Inter", sans-serif; font-variant-numeric: tabular-nums; }
.bx-pn-sub { margin: 2px 0 10px; color: var(--bp-muted); font-size: .875rem; }
.bx-pn-bar { display: grid; grid-template-columns: minmax(0, 8.5em) 1fr auto; align-items: center; gap: 4px 8px; margin: 6px 0; font-size: .875rem; }
.bx-pn-bar > span:first-child { overflow-wrap: anywhere; }
.bx-pn-bar > b { display: block; height: 10px; border-radius: 5px; background: var(--bp-land); overflow: hidden; border: 1px solid var(--bp-line); }
.bx-pn-bar > b > i { display: block; width: var(--w, 0); height: 100%; background: var(--bp-s5, #4479c5); }
.bx-pn-bar > em { font-style: normal; font-variant-numeric: tabular-nums; }
.bx-pn-list { margin: 8px 0; padding: 0; list-style: none; font-size: .875rem; }
.bx-pn-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--bp-rule); }
.bx-pn-list a { display: inline-flex; align-items: center; min-height: 44px; }
.bx-panel .bx-acts { margin-top: 12px; }
@media (min-width: 900px) {
  .bx-frame:is(.bx-q7, .bx-cat).is-js { grid-template-columns: minmax(0, 1fr) var(--bx-pw); column-gap: 16px; }
  .bx-frame:is(.bx-q7, .bx-cat).is-js > .bx-flsw, .bx-frame:is(.bx-q7, .bx-cat).is-js > .bx-sch-pick, .bx-frame:is(.bx-q7, .bx-cat).is-js > figcaption { grid-column: 1 / -1; }
  .bx-frame:is(.bx-q7, .bx-cat).is-js > .bx-panel, .bx-frame:is(.bx-q7, .bx-cat).is-js:not(:has(> .bx-panel))::after { grid-column: 2; grid-row: 2; align-self: start; height: var(--bx-mh); min-height: 0; }
}
@media (max-width: 899px) {
  .bx-frame:is(.bx-q7, .bx-cat).is-js > .bx-panel, .bx-frame:is(.bx-q7, .bx-cat).is-js:not(:has(> .bx-panel))::after { grid-column: 1; grid-row: 4; margin-top: 8px; }
  .bx-frame:is(.bx-q7, .bx-cat).is-js:not(:has(> .bx-panel))::after { padding: 10px 14px; }
  .bx-frame:is(.bx-q7, .bx-cat).is-js > figcaption { grid-row: 5; }
  .bx-pn-bar { grid-template-columns: minmax(0, 7em) 1fr auto; }
}
/* full screen keeps the panel next to the map on wide screens */
.bx-frame:is(.bx-q7, .bx-cat).is-fs > .bx-panel { max-height: 40%; }
@media (min-width: 900px) { .bx-frame:is(.bx-q7, .bx-cat).is-fs > .bx-panel, .bx-frame:is(.bx-q7, .bx-cat).is-fs:not(:has(> .bx-panel))::after { height: auto; max-height: none; align-self: stretch; } }

/* 7k step C (JS): find a place, empty state, reference bars, status line, two-finger / Ctrl+wheel hint */
.bx-panel { display: flex; flex-direction: column; gap: 10px; }
.bx-panel .bx-acts { margin-top: auto; }
.bx-find { display: flex; flex-direction: column; gap: 4px; }
.bx-find label { font-weight: 600; font-size: .875rem; }
.bx-find input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--bp-rule); border-radius: 8px; background: var(--bp-surface); color: var(--bp-ink); font: 400 1rem/1.2 "Inter", sans-serif; }
.bx-find input:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bx-pn-empty { margin: 0; color: var(--bp-muted); font-size: .9375rem; }
.bx-pn-bars { margin: 4px 0; }
.bx-pn-bar.is-ref > b > i { background: var(--bp-muted); }
.bx-pn-msg { margin: 0; min-height: 1.4em; font-size: .875rem; color: var(--bp-muted); }
.bx-zhint { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); z-index: 4; max-width: 86%; padding: 8px 14px; border-radius: 8px; background: #14181d; color: #fff; font: 600 .875rem/1.3 "Inter", sans-serif; text-align: center; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.bx-zhint[hidden] { display: none; }
.bx-fbox { touch-action: pan-x pan-y; }

/* All guides (home): cards grouped by menu section */
.bx-guides__sec { margin: 0 0 32px; }
.bx-guides__sec h3 { margin: 0 0 12px; font-size: 1.25rem; }
.bx-guides__list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.bx-guide { position: relative; display: flex; flex-direction: column; border: 1px solid var(--theme-palette-color-5); border-radius: 14px; overflow: hidden; background: var(--theme-palette-color-8); transition: border-color .15s; }
.bx-guide:hover, .bx-guide:focus-within { border-color: var(--theme-palette-color-1); }
.bx-guide:focus-within { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bx-guide img { display: block; width: 100%; height: auto; aspect-ratio: 300 / 158; object-fit: cover; }
.bx-guide h4 { margin: 14px 18px 0; font-size: 1.0625rem; }
.bx-guide h4 a { display: block; box-sizing: border-box; min-height: 24px; padding: 3px 0; margin: -3px 0; line-height: 1.3; color: var(--theme-palette-color-4); text-decoration: none; }   /* A8: link box >= 24px (WCAG 2.5.8); the ::after overlay still makes the whole card the target */
.bx-guide h4 a::after { content: ""; position: absolute; inset: 0; }
.bx-guide h4 a:focus-visible { outline: none; }
.bx-guide p { margin: 8px 18px 0; color: var(--theme-palette-color-3); font-size: .9375rem; line-height: 1.5; }
.bx-guide time { margin: auto 18px 0; padding: 12px 0 16px; color: var(--theme-palette-color-3); font: 500 .8125rem/1.2 "IBM Plex Mono", monospace; }

/* A5 step D: flood legend has 3 steps, not 7 */
.bx-floodmap .bx-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
