/* BLD new launches: 3D map, labels, facts. Works in the member area and the management pages. */
.bld-l3d { margin: 18px 0 24px; }
.bld-l3d__title { margin: 0 0 6px; font-size: 18px; }
.bld-l3d__flag { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #fcefd3; color: #6b4600; font-size: 14px; }
.bld-l3d__frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid #e6e2d8; background: #ebe8e1; }
.bld-l3d__map { width: 100%; height: clamp(360px, 62vh, 640px); }
.bld-l3d__map:focus-visible { outline: 3px solid #7d6223; outline-offset: -3px; }
.bld-l3d__map.is-picking .maplibregl-canvas { cursor: crosshair !important; }
.bld-l3d__msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: #3b3f4a; background: #f4f2ec; }
.bld-l3d__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid #e6e2d8; background: #fff; }
.bld-l3d__bar [aria-pressed="true"] { background: #0e1016; color: #fff; border-color: #0e1016; }
.bld-l3d__style { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; font-size: 14px; }
.bld-l3d__style select { min-height: 38px; border: 1px solid #c9c4b6; border-radius: 10px; padding: 0 8px; background: #fff; font: inherit; }
.bld-l3d__table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; }
.bld-l3d__table caption { text-align: left; font-weight: 600; padding: 4px 0 6px; }
.bld-l3d__table th, .bld-l3d__table td { padding: 7px 10px; border-bottom: 1px solid #ece8de; text-align: left; }
.bld-l3d__table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #5f6370; }

/* labels on the map (HTML markers: no font server needed) */
.bld-l3d-label { display: flex; align-items: baseline; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); border-left: 3px solid #8fa7ad; color: #16181f; font: 700 12px/1.2 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 4px 12px rgba(0, 0, 0, .12); }
.bld-l3d-label.is-tall { border-left-color: #c9a24c; }
.bld-l3d-label span { font-weight: 500; color: #5f6370; font-size: 11px; }
.bld-l3d-poi { display: flex; align-items: center; gap: 4px; pointer-events: none; }
.bld-l3d-poi__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #3d6fb4; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.bld-l3d-poi.is-mrt .bld-l3d-poi__dot { background: #9d5918; }
.bld-l3d-poi.is-school .bld-l3d-poi__dot { background: #2f7a4d; }
.bld-l3d-poi.is-park .bld-l3d-poi__dot { background: #3d8b3d; }
.bld-l3d-poi.is-mall .bld-l3d-poi__dot { background: #8a3d8b; }
.bld-l3d-poi__label { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #16181f; font: 600 11px/1.3 system-ui, sans-serif; white-space: nowrap; }
.bld-l3d-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #b42318; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: move; }
.bld-l3d-pop { display: flex; flex-direction: column; gap: 2px; font: 14px/1.4 system-ui, sans-serif; color: #16181f; }
.maplibregl-popup-close-button { width: 28px; height: 28px; font-size: 18px; }
.maplibregl-ctrl-attrib a { color: #2f5d90; }

/* facts */
.bld-launch__lede { margin: 6px 0 0; font-size: 17px; color: #3b3f4a; }
.bld-launch__facts h3, .bld-launch__sources h3 { margin: 24px 0 10px; font-size: 18px; }
.bld-launch__facts h4 { margin: 16px 0 6px; font-size: 15px; }
.bld-launch__facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; }
.bld-launch__facts dl > div { padding: 12px 14px; border: 1px solid #e6e2d8; border-radius: 12px; background: #fff; }
.bld-launch__facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #5f6370; }
.bld-launch__facts dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.bld-launch__nearby { margin: 0; padding-left: 20px; }
.bld-launch__notes { margin-top: 16px; }
.bld-launch__sources ul { margin: 0; padding-left: 20px; }
.bld-launch__mix { margin-top: 16px; }
.bld-launch__mix .bld-l3d__table { margin-top: 0; }
.bld-l3d-shape { white-space: nowrap; font-size: 13.5px; }
.bld-launch__disclaimer { margin-top: 24px; font-size: 13px; }

/* editor (management pages) */
.bld-l3d-edit .bld-l3d__map { height: clamp(380px, 60vh, 620px); }
.bld-l3d-edit__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.bld-l3d-edit__hint { margin: 0; color: #5f6370; font-size: 13.5px; }
.bld-l3d-grid { width: 100%; border-collapse: collapse; }
.bld-l3d-grid th { font-size: 12px; text-align: left; color: #5f6370; padding: 6px 4px; white-space: nowrap; }
.bld-l3d-grid td { padding: 4px; vertical-align: middle; }
.bld-l3d-grid input[type="number"] { width: 84px; }
.bld-l3d-grid input[data-k="lat"], .bld-l3d-grid input[data-k="lng"] { width: 124px; }
.bld-l3d-grid input[type="text"] { width: 100%; min-width: 110px; }
.bld-l3d-coords { display: flex; flex-wrap: wrap; gap: 12px; }
.bld-l3d-coords .bld-field { margin: 0; }
.bld-l3d-coords input { width: 140px; }
@media (max-width: 719px) { .bld-l3d__style { margin-left: 0; } }
.bld-l3d-form fieldset.bld-field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.bld-l3d-form fieldset.bld-field legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
/* the tower / place tables scroll inside their card on small screens */
.bld-l3d-form .bld-card, .bld-l3d-form [data-l3d-model] { min-width: 0; }
.bld-l3d-form .bld-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bld-l3d-form .bld-table-wrap > table { display: table; width: max-content; min-width: 100%; }
.bld-l3d-form .bld-table-wrap, .bld-l3d-grid { position: relative; }

/* explore panel: units, sun, wind (member page) */
.bld-article.bld-launch { max-width: 1280px; }
.bld-l3d { container-type: inline-size; }
.bld-l3d__layout { display: block; }
.bld-l3d__layout.has-explore { display: grid; gap: 14px; }
@container (min-width: 940px) {
	.bld-l3d__layout.has-explore { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
	.bld-l3d__layout.has-explore .bld-xp { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
	.bld-l3d__layout.has-explore .bld-l3d__map { height: clamp(460px, 74vh, 760px); }
}
.bld-xp { border: 1px solid #e6e2d8; border-radius: 16px; background: #fff; padding: 0 0 12px; min-width: 0; }
.bld-xp__tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid #ece8de; position: sticky; top: 0; background: #fff; z-index: 1; border-radius: 16px 16px 0 0; }
.bld-xp__tabs [role="tab"] { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font: 600 14px/1 inherit; color: #3b3f4a; cursor: pointer; }
.bld-xp__tabs [role="tab"][aria-selected="true"] { background: #0e1016; color: #fff; }
.bld-xp__tabs [role="tab"]:focus-visible { outline: 3px solid #7d6223; outline-offset: 1px; }
.bld-xp__pane { padding: 12px 14px 0; }
.bld-xp__filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.bld-xp__filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 600; color: #3b3f4a; min-width: 0; }
.bld-xp__filters select, .bld-xp__filters input[type="date"] { min-height: 38px; border: 1px solid #c9c4b6; border-radius: 10px; padding: 0 8px; background: #fff; font: inherit; font-weight: 400; min-width: 0; width: 100%; }
.bld-xp__time { grid-column: 1 / -1; }
.bld-xp__time input { width: 100%; accent-color: #7d6223; }
.bld-xp__time output { font-weight: 700; color: #16181f; margin-left: 4px; }
.bld-xp__row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.bld-xp__count, .bld-xp__hint, .bld-xp__out { margin: 6px 0 10px; font-size: 13.5px; color: #3b3f4a; }
.bld-xp__note { margin: 10px 0 0; font-size: 12px; color: #5f6370; }
.bld-xp__fieldset { border: 0; margin: 0 0 8px; padding: 0; }
.bld-xp__fieldset .bld-choice { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; }
.bld-xp__fieldset legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.bld-xp__blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bld-xp__blockbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 10px; border: 1px solid #ddd8cb; border-radius: 12px; background: #faf8f3; font: inherit; text-align: left; cursor: pointer; }
.bld-xp__blockbtn span { font-size: 12px; color: #5f6370; }
.bld-xp__blockbtn:hover, .bld-xp__blockbtn:focus-visible { border-color: #7d6223; outline: none; box-shadow: 0 0 0 2px rgba(125, 98, 35, .25); }
.bld-xp__gridwrap { max-width: 100%; overflow-x: auto; max-height: 360px; overflow-y: auto; border: 1px solid #ece8de; border-radius: 10px; position: relative; }
.bld-xp__grid { border-collapse: separate; border-spacing: 2px; font-size: 11px; margin: 0; }
.bld-xp__grid caption { text-align: left; font-weight: 600; font-size: 12.5px; padding: 6px 4px; }
.bld-xp__grid th { font-weight: 600; color: #5f6370; padding: 0 3px; text-align: center; position: sticky; background: #fff; }
.bld-xp__grid thead th { top: 0; z-index: 1; }
.bld-xp__grid tbody th { left: 0; }
.bld-xp__grid td { padding: 0; }
.bld-xp__cell { display: block; width: 26px; height: 24px; border: 0; border-radius: 4px; cursor: pointer; padding: 0; }
.bld-xp__cell.is-a { background: #2f9e6a; }
.bld-xp__cell.is-r { background: #e0a526; }
.bld-xp__cell.is-s { background: #c4453c; }
.bld-xp__cell.is-dim { opacity: .18; }
.bld-xp__cell.is-sel { box-shadow: 0 0 0 2px #0e1016, 0 0 0 4px #f5c542; }
.bld-xp__cell:focus-visible { outline: 3px solid #0e1016; outline-offset: 1px; }
.bld-xp__legend { display: flex; gap: 12px; margin: 8px 0 0; font-size: 12px; }
.bld-xp__legend span::before, .bld-units-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bld-xp__legend .is-a::before, .bld-units-legend .is-a::before { background: #2f9e6a; }
.bld-xp__legend .is-r::before, .bld-units-legend .is-r::before { background: #e0a526; }
.bld-xp__legend .is-s::before, .bld-units-legend .is-s::before { background: #c4453c; }
.bld-xp__unit { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ece8de; }
.bld-xp__unit-title { margin: 0 0 4px; font-size: 18px; }
.bld-xp__unit-title:focus { outline: none; }
.bld-xp__status { margin: 0 0 8px; font-size: 14px; }
.bld-xp__status strong { display: inline-block; padding: 2px 8px; border-radius: 999px; color: #fff; }
.bld-xp__status.is-a strong { background: #1f7a50; }
.bld-xp__status.is-r strong { background: #8a5d00; }
.bld-xp__status.is-s strong { background: #a3332b; }
.bld-xp__facts { display: grid; gap: 6px; margin: 0 0 10px; }
.bld-xp__facts div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 13.5px; }
.bld-xp__facts dt { color: #5f6370; }
.bld-xp__facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bld-xp__plan { margin: 0; }
.bld-xp__planbtn { display: block; width: 100%; padding: 0; border: 1px solid #e6e2d8; border-radius: 10px; overflow: hidden; background: #fbf8f1; cursor: zoom-in; }
.bld-xp__planbtn img { display: block; width: 100%; height: auto; }
.bld-xp__planbtn:focus-visible { outline: 3px solid #7d6223; outline-offset: 2px; }
.bld-xp__plan figcaption, .bld-xp__noplan { font-size: 12.5px; color: #5f6370; margin: 6px 0 0; }
.bld-xp-dialog { width: min(96vw, 1200px); max-height: 94vh; padding: 0; border: 0; border-radius: 14px; overflow: auto; }
.bld-xp-dialog::backdrop { background: rgba(14, 16, 22, .7); }
.bld-xp-dialog__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; position: sticky; top: 0; background: #fff; border-bottom: 1px solid #ece8de; }
.bld-xp-dialog img { display: block; width: 100%; height: auto; }
.bld-xp-wind { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bld-xp-windbadge { position: absolute; z-index: 2; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); font: 600 12.5px/1 system-ui, sans-serif; color: #16181f; pointer-events: none; }
.bld-xp-windbadge__arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1c62aa; color: #fff; font-size: 14px; transition: transform .3s; }

/* units editor (Manage) */
.bld-units-legend { display: flex; gap: 14px; font-size: 13px; }
.bld-units-chart { margin: 12px 0; max-height: 520px; overflow: auto; border: 1px solid #ece8de; border-radius: 10px; }
.bld-units-grid { border-collapse: separate; border-spacing: 2px; font-size: 11px; }
.bld-units-grid caption { text-align: left; font-weight: 700; padding: 6px; }
.bld-units-grid th { padding: 0 4px; color: #5f6370; position: sticky; background: #fff; }
.bld-units-grid thead th { top: 0; }
.bld-units-grid tbody th { left: 0; }
.bld-unit { min-width: 54px; min-height: 26px; border: 0; border-radius: 5px; color: #fff; font: 600 10.5px/1 system-ui, sans-serif; cursor: pointer; }
.bld-unit.is-a { background: #1f7a50; }
.bld-unit.is-r { background: #8a5d00; }
.bld-unit.is-s { background: #a3332b; }
.bld-unit:focus-visible { outline: 3px solid #0e1016; outline-offset: 1px; }
.bld-units-edit textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* rc4: colour modes, hover tip, unit popup */
.bld-xp__colour { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 600; color: #3b3f4a; margin: 4px 0 6px; }
.bld-xp__colour select { min-height: 38px; border: 1px solid #c9c4b6; border-radius: 10px; padding: 0 8px; background: #fff; font: inherit; font-weight: 400; }
.bld-xp-legend3d { position: absolute; z-index: 2; left: 12px; bottom: 34px; display: flex; flex-direction: column; gap: 3px; max-width: min(240px, 60%); padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); font: 12px/1.3 system-ui, sans-serif; color: #16181f; pointer-events: none; }
.bld-xp-legend3d strong { font-size: 12.5px; margin-bottom: 2px; }
.bld-xp-legend3d__row { display: flex; align-items: center; gap: 6px; }
.bld-xp-legend3d__row i { flex: none; width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.bld-xp-tip .maplibregl-popup-content { padding: 6px 10px; border-radius: 10px; font: 600 12.5px/1.3 system-ui, sans-serif; color: #16181f; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.bld-xp-tip { pointer-events: none; }
.bld-xp-unitdlg { width: min(96vw, 980px); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; overflow: auto; color: #16181f; }
.bld-xp-unitdlg::backdrop { background: rgba(14, 16, 22, .62); }
.bld-xp-unitdlg__bar { position: sticky; top: 0; z-index: 1; display: flex; gap: 8px; justify-content: flex-end; padding: 10px 12px; background: #fff; border-bottom: 1px solid #ece8de; }
.bld-xp-unitdlg__bar [data-xp-close] { margin-left: 8px; }
.bld-xp-unitdlg__body { display: grid; gap: 4px 24px; padding: 16px 20px 20px; }
.bld-xp-unitdlg__body .bld-xp__unit-title { font-size: 24px; margin: 0; }
.bld-xp-unitdlg__body .bld-xp__unit-title:focus { outline: none; }
@media (min-width: 820px) {
	.bld-xp-unitdlg__body { grid-template-columns: 300px minmax(0, 1fr); }
	.bld-xp-unitdlg__body > .bld-xp__unit-title, .bld-xp-unitdlg__body > .bld-xp__status, .bld-xp-unitdlg__body > .bld-xp__facts, .bld-xp-unitdlg__body > .bld-xp__note { grid-column: 1; }
	.bld-xp-unitdlg__body > .bld-xp__plan { grid-column: 2; grid-row: 1 / span 4; }
}
.bld-xp__planlink { display: block; border: 1px solid #e6e2d8; border-radius: 10px; overflow: hidden; background: #fbf8f1; }
.bld-xp__planlink img { display: block; width: 100%; height: auto; }
.bld-xp__planlink:focus-visible { outline: 3px solid #7d6223; outline-offset: 2px; }
.bld-l3d__frame { position: relative; }
.bld-l3d__gattr { right: 8px; bottom: 34px; z-index: 5; }
.bld-l3d__frame .bld-trm__gtools { margin-top: 8px; }
.bld-l3d__gattr { position: absolute; max-width: 70%; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.88); color: #222; font-size: 11px; line-height: 1.35; text-align: right; pointer-events: none; }
.bld-trm__gtools { margin: 10px 0; padding: 10px 12px; border: 1px solid #d9d2c0; border-radius: 10px; background: #faf7ef; }
.bld-trm__gtools-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; }
.bld-trm__gtools-row input[type=number] { width: 78px; }
.bld-l3d__exit { position: absolute; top: 10px; left: 10px; z-index: 6; }

/* 1.9.0-rc45: surroundings toggle */
.bld-l3d__nbr { margin-left: 0; }
.bld-l3d__nbr[hidden] { display: none; }
.bld-l3d__nbr input { width: 18px; height: 18px; }

/* rc121: sun and wind exposure indices, floor by floor */
.bld-xp__idx { margin: 10px 0; border: 1px solid rgba(0, 0, 0, .1); border-radius: 10px; padding: 8px 10px; }
.bld-xp__idx summary { cursor: pointer; font-weight: 650; min-height: 28px; }
.bld-xp__idxgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.bld-xp__idxfig { margin: 0; min-width: 0; }
.bld-xp__idxfig figcaption { font-size: 12px; font-weight: 650; margin-bottom: 3px; }
.bld-xp__prof { display: block; width: 100%; height: auto; font-family: system-ui, sans-serif; }
