@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=DM+Sans:wght@400;500;700&family=DM+Mono:wght@400;500&display=swap');

/* Rainplan brand, observed at https://myrainplan.com on 2026-11-16.
   Layout and map behavior remain in styles.css and app.js. */
:root {
  --deep: #195abd;
  --bright: #4096ff;
  --sky: #e2f1fd;
  --mint: #c5ffbc;
  --green-ink: #0c4a38;
  --navy: #122a52;
  --navy-2: #0d2142;
  --ink: #303030;
  --muted: #5a6a85;
  --paper: #f7fafd;
  --line: #dce8f5;
  --soft: #eef5fc;
  --green: var(--deep);
  --lime: var(--mint);
  --shadow: 0 10px 30px #122a5214;
  font-family: 'DM Sans', system-ui, sans-serif;
}
body { -webkit-font-smoothing: antialiased; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--bright);
  outline-offset: 3px;
}
.topbar { background: var(--navy); border-bottom: 1px solid #ffffff14; }
.brand { font-family: 'DM Sans', sans-serif; letter-spacing: normal; gap: 0; }
.brand-logo { display: block; height: 38px; width: auto; }
.brand-divider { margin: 0 21px; background: #ffffff26; }
.product-name { color: #ffffffe0; font-size: 14px; font-weight: 500; }
.header-meta { color: #ffffffb8; }
.local-dot { background: var(--mint); }
.button { border: 1.5px solid var(--line); border-radius: 10px; color: var(--deep); font-weight: 700; }
.button:hover { background: var(--sky); }
.import-button { background: var(--mint); color: var(--green-ink); border-color: var(--mint); }
.import-button:hover { background: #b4f7a9; border-color: #b4f7a9; }
.sidebar { border-color: var(--line); background: var(--paper); }
.sidebar-heading { background: var(--navy); padding-top: 25px; padding-bottom: 21px; }
.eyebrow, .layer-control legend, .incentive-tag, .fact > span {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
}
.eyebrow { color: var(--deep); font-size: 10px; letter-spacing: .14em; }
.sidebar-heading .eyebrow { color: var(--mint); }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 600; color: white; font-size: 29px; letter-spacing: -.02em; line-height: 1.13; margin: 14px 0; }
h1 em { color: var(--mint); font-weight: 500; }
.sidebar-heading p { color: #ffffffcc; font-size: 12px; line-height: 1.6; }
.portfolio-stats { background: var(--navy-2); border-top: 1px solid #ffffff14; padding: 17px 25px; }
.portfolio-stats > div + div { border-color: #ffffff1c; }
.portfolio-stats strong { font-family: Fraunces, Georgia, serif; color: var(--mint); font-weight: 600; font-size: 27px; letter-spacing: -.01em; }
.portfolio-stats span { color: #ffffffb8; font-size: 10px; }
.filters { background: white; border-color: var(--line); }
.search-field { border-color: var(--line); border-radius: 10px; }
.search-field span { color: var(--muted); }
.search-field input { font-size: 12px; color: var(--navy); }
.search-field input::placeholder { color: #78879d; }
.search-field:focus-within { outline-color: var(--deep); }
.select-row select { border-color: var(--line); color: var(--navy); border-radius: 8px; font-size: 10.5px; }
.toggle-row { color: var(--navy); font-size: 12px; }
.switch { background: #b8c7dc; }
.toggle-row input:checked + .switch { background: var(--deep); }
.toggle-row input:focus-visible + .switch { outline-color: var(--bright); }
.text-button { color: var(--deep); }
.results-heading { color: var(--navy); }
.results { scrollbar-color: #bacde3 transparent; }
.facility-card { border-bottom-color: var(--line); border-radius: 10px; }
.facility-card:hover { background: var(--soft); }
.facility-card.selected { background: var(--sky); border-color: #9ac5f0; }
.card-heading { color: var(--navy); font-size: 12.5px; font-weight: 700; }
.card-heading .arrow { color: var(--deep); }
.card-address, .card-meta, .sidebar-footer { color: var(--muted); }
.badge { background: var(--mint); color: var(--green-ink); border-color: #a9efa0; border-radius: 999px; font-size: 9px; padding: 4px 8px; font-weight: 700; }
.badge.muted { background: var(--soft); color: var(--muted); border-color: var(--line); }
.status-dot { background: var(--deep); }
.empty-state strong { color: var(--navy); }
.map-mode, .layer-control { background: #fffffffa; border-color: var(--line); border-radius: 14px; color: var(--navy); }
.satellite-icon { color: var(--deep); }
.map-live-dot { background: var(--deep); }
.map-mode { display: flex; padding: 8px 10px 8px 13px; gap: 5px; }
.map-mode select { border: 0; background: transparent; color: var(--navy); font: 700 12px 'DM Sans', sans-serif; padding: 7px 5px; cursor: pointer; }
#map[data-basemap="terrain"] .parcel-point > span { background: var(--deep); }
#map[data-basemap="terrain"] .parcel-point.no-incentive > span { background: var(--muted); }
#map[data-basemap="terrain"] .parcel-point.is-selected > span { background: var(--bright); }
.map-region:has(#map[data-basemap="terrain"]) .legend-polygon { background: var(--sky); border-color: var(--deep); }
.layer-control legend { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.layer-control label { font-size: 11px; }
.layer-control input { accent-color: var(--deep); }
.legend-dot { background: var(--deep); box-shadow: 0 0 0 1px var(--deep); }
.legend-polygon { background: var(--mint); border-color: var(--green-ink); }
.map-bottom-note { background: #122a52ed; }
.map-bottom-note .legend-dot { background: var(--mint); box-shadow: 0 0 0 1px var(--mint); }
.leaflet-control-zoom { border-color: var(--line) !important; border-radius: 10px !important; }
.leaflet-control-zoom a { color: var(--navy) !important; }
.cluster-bubble { background: #c5ffbcf5; color: var(--green-ink); border-color: #ffffffbf; box-shadow: 0 0 0 7px #c5ffbc33, 0 2px 6px #0d21424d; }
.parcel-point > span { background: var(--mint); box-shadow: 0 0 0 4px #c5ffbc40, 0 2px 4px #0d214280; }
.parcel-point.no-incentive > span { background: var(--sky); }
.parcel-point.is-selected > span { background: var(--bright); box-shadow: 0 0 0 6px #c5ffbc88, 0 2px 5px #0d214280; }
.leaflet-tooltip { color: var(--navy); }
.loading-overlay { background: #f7fafdf5; }
.loading-overlay strong { font-family: Fraunces, Georgia, serif; color: var(--navy); font-weight: 600; letter-spacing: -.01em; }
.spinner { border-color: var(--line); border-top-color: var(--deep); }
.detail-panel { background: white; border-color: var(--line); border-radius: 14px; box-shadow: 0 24px 60px #0d21424d; scrollbar-color: #bacde3 transparent; }
.detail-topline { padding-top: 17px; }
.detail-topline .eyebrow { font-size: 10px; }
.icon-button { color: var(--muted); }
.icon-button:hover { background: var(--sky); }
.detail-title h2 { font-family: Fraunces, Georgia, serif; font-size: 25px; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.detail-title .badge { font-size: 10px; }
.detail-address { color: var(--muted); }
.property-facts { background: var(--paper); }
.fact > span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.fact strong { color: var(--navy); font-family: Fraunces, Georgia, serif; font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.fact small { color: var(--muted); }
.fact.wide strong { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; }
.section-title h3 { color: var(--navy); font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; }
.count-pill { background: var(--sky); color: var(--deep); font-weight: 700; }
.section-subtitle { font-size: 11px; color: var(--muted); }
.incentive-card { border-color: var(--line); background: var(--paper); border-radius: 14px; padding: 15px; }
.incentive-tag { color: var(--deep); font-size: 9px; letter-spacing: .08em; }
.incentive-card h4 { color: var(--navy); font-size: 12px; font-weight: 700; }
.incentive-value { font-family: Fraunces, Georgia, serif; color: var(--deep); font-weight: 600; font-size: 23px; letter-spacing: -.01em; }
.incentive-value small, .incentive-summary, .incentive-jurisdiction { color: var(--muted); }
.incentive-jurisdiction { font-size: 10px; }
.incentive-links a, .program-more { color: var(--deep); font-size: 11px; }
.inactive-list > summary { color: var(--muted); font-size: 11px; }
.inactive-list .incentive-card { background: var(--soft); }
.attributes { font-size: 11px; }
.attributes dd { color: var(--navy); }
.detail-note { color: var(--muted); font-size: 10px; }
.toast { background: var(--navy); }
dialog { background: white; }
dialog::backdrop { background: #0d214280; }
.dialog-header h2 { font-family: Fraunces, Georgia, serif; color: var(--navy); font-weight: 600; }
#info-content { color: var(--muted); }
.demo-banner { color: var(--mint) !important; }

@media (min-width: 1550px) {
  h1 { font-size: 32px; }
}
@media (max-height: 780px) and (min-width: 961px) {
  .sidebar-heading { padding-top: 20px; padding-bottom: 17px; }
  h1 { font-size: 27px; margin: 12px 0; }
  .portfolio-stats { padding-top: 14px; padding-bottom: 14px; }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .select-row { grid-template-columns: 1fr 1fr; }
  .select-row label:last-child { display: block; }
}
@media (max-width: 960px) {
  .brand-logo { height: 32px; }
  .brand-divider { margin: 0 12px; }
  .product-name { font-size: 11px; }
  .sidebar { visibility: hidden; }
  .sidebar.mobile-open { visibility: visible; }
  .sidebar-heading { padding: 23px 22px 20px; }
  h1 { font-size: 28px; }
  .portfolio-stats { padding-left: 22px; padding-right: 22px; }
  .map-region:has(.detail-panel:not([hidden])) .layer-control { visibility: hidden; }
}
@media (max-width: 380px) {
  .product-name, .brand-divider { display: none; }
}

/* Incentive summaries stay prominent; shorter screens can scroll the sidebar. */
.sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bacde3 transparent; }
.sidebar > :not(.results) { flex-shrink: 0; }
.results { flex: 1 0 160px; min-height: 160px; }
.sidebar-heading { padding-top: 18px; padding-bottom: 17px; }
.sidebar-heading h1 { font-size: 26px; margin: 11px 0; }
.portfolio-stats { padding-top: 12px; padding-bottom: 12px; }
.portfolio-stats strong { font-size: 23px; }
.portfolio-potential { background: var(--mint); color: var(--green-ink); padding: 17px 22px; border-block: 1px solid #a9efa0; }
.portfolio-potential .eyebrow { display: block; color: var(--green-ink); font-size: 10px; letter-spacing: .09em; }
.portfolio-potential > strong { display: block; font: 600 32px/1.18 Fraunces, Georgia, serif; letter-spacing: -.03em; margin: 8px 0 5px; overflow-wrap: anywhere; }
.potential-coverage { display: block; font-size: 10px; line-height: 1.5; }
.portfolio-potential p { font-size: 11px; line-height: 1.5; margin: 8px 0 5px; }
.portfolio-potential small { display: block; font-size: 9px; line-height: 1.5; color: #30634e; }
.parcel-potential { margin: 20px 23px 0; padding: 19px; background: var(--mint); color: var(--green-ink); border: 1px solid #a9efa0; border-radius: 14px; }
.parcel-potential .eyebrow { color: var(--green-ink); font-size: 10px; letter-spacing: .08em; }
.potential-amount { display: block; font: 600 30px/1.15 Fraunces, Georgia, serif; letter-spacing: -.025em; margin: 10px 0; overflow-wrap: anywhere; }
.potential-program { font-size: 12px; line-height: 1.5; font-weight: 700; margin: 0 0 10px; }
.parcel-potential small { display: block; font-size: 10px; line-height: 1.5; color: #30634e; }
.parcel-potential { display: block; text-align: left; width: calc(100% - 46px); }
button.parcel-potential:hover { background: #b4f7a9; }
.potential-jump { display: block; float: right; font-size: 10px; font-weight: 700; }
.card-potential { margin-top: 10px; font: 600 18px Fraunces, Georgia, serif; color: var(--deep); }
.incentive-card:focus { outline: 2px solid var(--deep); outline-offset: 3px; }
.select-row { grid-template-columns: 1fr; }
.toggle-row { min-height: 55px; padding: 13px 14px; border: 1.5px solid #a9efa0; border-radius: 10px; background: #e5ffdf; color: var(--green-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.toggle-row:hover { background: #d8ffd0; }
.toggle-row:has(input:checked) { background: var(--mint); border-color: var(--deep); }
.toggle-row input { right: 14px; width: 42px; height: 26px; }
.toggle-row .switch { flex-shrink: 0; width: 42px; height: 26px; background: #71859b; }
.toggle-row .switch::before { width: 20px; height: 20px; }
.toggle-row input:checked + .switch::before { transform: translateX(16px); }
.surface-section h3 { font-size: 15px; color: var(--navy); margin: 0 0 18px; }
.surface-values { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 18px; }
.surface-values .fact strong { font-size: 21px; }
.surface-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.card-surface { margin-top: 7px; font-size: 11px; color: var(--navy); font-weight: 500; }
.sort-control { display: flex; align-items: center; gap: 9px; padding: 0 22px 12px; color: var(--muted); font-size: 10px; }
.sort-control > span { white-space: nowrap; }
.sort-control select { min-width: 0; flex: 1; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 9px 5px; color: var(--navy); font: 500 11px 'DM Sans', sans-serif; }
.bmp-filter { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: white; font-size: 12px; }
.bmp-filter summary { cursor: pointer; padding: 12px; font-weight: 700; }
:is(#bmp-options, #type-options) { max-height: 210px; overflow-y: auto; border-top: 1px solid var(--line); padding: 6px; }
:is(#bmp-options, #type-options) label { display: flex; align-items: center; gap: 9px; padding: 9px 6px; cursor: pointer; line-height: 1.4; }
:is(#bmp-options, #type-options) input { accent-color: var(--deep); width: 16px; height: 16px; flex-shrink: 0; }
#reset-filters { padding: 9px 13px; min-height: 36px; border-radius: 8px; background: var(--deep); color: white; font-size: 11px; font-weight: 700; text-decoration: none; }
#reset-filters:hover { background: var(--navy); }
@media (max-height: 900px) {
  .sidebar-heading p { display: none; }
  .sidebar-heading h1 { margin: 8px 0 0; font-size: 24px; }
  .portfolio-potential { padding-top: 14px; padding-bottom: 14px; }
}
@media (max-height: 780px) and (min-width: 961px) {
  .sidebar-heading { display: none; }
}

.portfolio-potential .toggle-row { margin: 14px 0 10px; background: #f2ffef; }

/* Compact sidebar: controls stay in view while the facilities get the remaining space. */
.sidebar { overflow: hidden; }
.portfolio-potential { padding: 14px 16px 12px; }
.portfolio-potential > strong { font-size: 29px; line-height: 1.15; margin: 7px 0 0; }
.portfolio-potential .toggle-row { min-height: 42px; padding: 8px 11px; margin: 10px 0 0; font-size: 12px; }
.portfolio-potential .toggle-row input { right: 11px; }
.portfolio-potential p { font-size: 10px; line-height: 1.4; margin: 8px 0 0; }
.portfolio-stats { grid-template-columns: 1fr 1.5fr; gap: 12px; padding: 9px 16px; }
.portfolio-stats > div + div { padding-left: 15px; }
.portfolio-stats > div { display: flex; align-items: center; gap: 7px; }
.portfolio-stats strong { font-size: 20px; line-height: 1.15; margin: 0; }
.portfolio-stats span { font-size: 10px; }
.filters { position: relative; z-index: 3; padding: 12px 16px 10px; border-bottom: 0; }
.search-field input { height: 38px; }
.filter-types { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; position: relative; margin-top: 8px; }
.bmp-filter { min-width: 0; margin: 0; font-size: 11px; }
.bmp-filter summary { display: flex; align-items: center; gap: 5px; min-height: 38px; padding: 8px; list-style: none; }
.bmp-filter summary::-webkit-details-marker { display: none; }
.bmp-filter summary::after { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.bmp-filter[open] summary::after { transform: translateY(2px) rotate(225deg); }
.bmp-filter summary > span:first-child { white-space: nowrap; }
.bmp-filter summary:not(.has-selection) .filter-count { display: none; }
.bmp-filter summary::after { margin-left: auto; }
.filter-count { margin-left: auto; padding: 2px 4px; border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.has-selection .filter-count { background: var(--deep); color: white; min-width: 19px; text-align: center; }
.bmp-filter:has(.has-selection), .bmp-filter[open] { border-color: var(--deep); background: var(--soft); }
:is(#bmp-options, #type-options) { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0; max-height: min(270px, 35dvh); background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px #122a5233; padding: 7px; overscroll-behavior: contain; }
:is(#bmp-options, #type-options) label { min-height: 38px; padding: 9px 8px; border-radius: 6px; font-size: 12px; }
:is(#bmp-options, #type-options) label:hover { background: var(--soft); }
.results-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; background: white; border-bottom: 1px solid var(--line); }
.results-toolbar .sort-control { flex: 1; min-width: 0; padding: 0; }
.results-toolbar .sort-control select { width: 100%; min-height: 38px; padding: 8px 5px; }
#reset-filters { flex-shrink: 0; min-height: 38px; padding: 8px 10px; }
.results { flex: 1 1 0; min-height: 0; padding: 6px 8px 8px; overscroll-behavior: contain; }
.facility-card { padding: 10px; border-radius: 9px; }
.card-heading { font-size: 12px; }
.card-heading > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.card-address { font-size: 10px; margin-top: 2px; }
.card-meta { margin-top: 6px; gap: 7px; flex-wrap: wrap; }
.card-meta .badge { padding: 3px 6px; }
.card-highlights { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: 7px; }
.card-highlights .card-potential { font-size: 17px; line-height: 1.3; margin: 0; }
.card-highlights .card-potential.unavailable { font: 500 10px/1.4 'DM Sans', sans-serif; color: var(--muted); }
.card-highlights .card-surface { margin: 0; font-size: 10px; }
.sidebar-footer { min-height: 32px; padding: 7px 16px; }
@media (max-width: 960px) {
  .portfolio-potential .toggle-row, .bmp-filter summary, .search-field input, .results-toolbar .sort-control select, #reset-filters { min-height: 44px; }
  :is(#bmp-options, #type-options) label { min-height: 44px; }
}
@media (max-height: 560px) {
  .sidebar { overflow-y: auto; }
  .results { flex: 1 0 160px; min-height: 160px; }
}

.card-land { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.card-land .card-surface { margin: 0; font-size: 10px; }

.potential-count { display: block; font-size: 10px; line-height: 1.4; margin-top: 4px; }
.percentage-potential { border-top: 1px solid #0c4a3826; margin-top: 10px; padding-top: 10px; }
.percentage-potential > strong { display: block; font: 600 22px/1.2 Fraunces, Georgia, serif; margin-top: 5px; }
.percentage-potential small { margin-top: 4px; }

#detail-content > .parcel-potential { margin: 0 23px 20px; }
