.bdnb-panel {
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid #d9d1c3;
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0, rgba(208, 159, 79, .16), transparent 25%),
    linear-gradient(145deg, #fffdf8 0%, #faf7ef 100%);
  color: #172d24;
  box-shadow: 0 14px 38px rgba(23, 45, 36, .10);
}

.bdnb-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid #e4ddcf;
}

.bdnb-heading-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #183b30;
  color: #f1cf91;
  font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.bdnb-heading h3,
.bdnb-target h4,
.bdnb-neighborhood h4 {
  margin: 3px 0 5px;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.bdnb-heading h3 { font-size: clamp(18px, 2vw, 25px); }
.bdnb-heading p,
.bdnb-target p,
.bdnb-neighborhood p {
  margin: 0;
  color: #65736c;
  font-size: 12px;
  line-height: 1.55;
}

.bdnb-eyebrow,
.bdnb-target-label {
  color: #a76c20;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .10em;
}

.bdnb-source-badge {
  padding: 7px 10px;
  border: 1px solid #dfc591;
  border-radius: 999px;
  background: #fff7e8;
  color: #7e531c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.bdnb-target { padding: 22px 24px; }
.bdnb-target-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.bdnb-target-head h4 { font-size: 17px; }
.bdnb-target-dpe {
  display: grid;
  justify-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.bdnb-target-dpe small {
  color: #748078;
  font-size: 8px;
  font-weight: 700;
}

.bdnb-dpe {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: 7px;
  background: #a7afa9;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.bdnb-dpe-a { background: #168451; }
.bdnb-dpe-b { background: #4da94d; }
.bdnb-dpe-c { background: #9dbb3f; }
.bdnb-dpe-d { background: #e4bd32; color: #443714; }
.bdnb-dpe-e { background: #dc8c2d; }
.bdnb-dpe-f { background: #c85436; }
.bdnb-dpe-g { background: #96353e; }

.bdnb-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.bdnb-fact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e7dfd1;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
}
.bdnb-fact-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #edf3ef;
  color: #1d5542;
  font-size: 16px;
}
.bdnb-fact small,
.bdnb-fact strong,
.bdnb-fact em {
  display: block;
  overflow-wrap: break-word;
  word-break: normal;
}
.bdnb-fact small {
  color: #79847e;
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bdnb-fact strong {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.25;
}
.bdnb-fact em {
  margin-top: 3px;
  color: #7c6a4c;
  font-size: 9px;
  font-style: normal;
  line-height: 1.3;
}

.bdnb-technical-details,
.bdnb-building-list {
  margin-top: 13px;
  border: 1px solid #e4ddcf;
  border-radius: 12px;
  background: rgba(255,255,255,.62);
}
.bdnb-technical-details summary,
.bdnb-building-list summary {
  padding: 12px 14px;
  cursor: pointer;
  color: #24483b;
  font-size: 11px;
  font-weight: 800;
  list-style-position: inside;
}
.bdnb-technical-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 14px 14px;
}
.bdnb-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee8dc;
}
.bdnb-detail:nth-last-child(-n+2) { border-bottom: 0; }
.bdnb-detail dt,
.bdnb-detail dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: break-word;
  word-break: normal;
  font-size: 10px;
  line-height: 1.35;
}
.bdnb-detail dt { color: #758078; }
.bdnb-detail dd { color: #263d35; font-weight: 750; }

.bdnb-neighborhood {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
  gap: 18px;
  padding: 22px 24px;
  border-top: 1px solid #e4ddcf;
  border-bottom: 1px solid #e4ddcf;
  background: rgba(234, 240, 236, .52);
}
.bdnb-neighborhood h4 { font-size: 17px; }
.bdnb-sector-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.bdnb-sector-kpis span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe3dd;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.bdnb-sector-kpis small,
.bdnb-sector-kpis b {
  display: block;
  overflow-wrap: break-word;
  word-break: normal;
}
.bdnb-sector-kpis small {
  color: #7a857e;
  font-size: 8px;
}
.bdnb-sector-kpis b {
  margin-top: 3px;
  font-size: 10px;
}
.bdnb-dpe-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9dfda;
  border-radius: 14px;
  background: rgba(255,255,255,.78);
}
.bdnb-dpe-card > strong,
.bdnb-dpe-card > small {
  display: block;
}
.bdnb-dpe-card > strong { font-size: 11px; }
.bdnb-dpe-card > small {
  margin-top: 3px;
  color: #7b857f;
  font-size: 8px;
}
.bdnb-dpe-distribution {
  display: grid;
  grid-template-columns: repeat(7, minmax(22px, 1fr));
  align-items: end;
  gap: 4px;
  height: 108px;
  margin-top: 10px;
}
.bdnb-dpe-distribution > div {
  display: grid;
  height: 100%;
  grid-template-rows: 16px 1fr 24px;
  justify-items: center;
  align-items: end;
}
.bdnb-dpe-distribution b {
  align-self: center;
  font-size: 8px;
}
.bdnb-dpe-distribution i {
  width: 9px;
  height: var(--bdnb-height);
  max-height: 60px;
  border-radius: 5px 5px 2px 2px;
  background: #d9ddd9;
}

.bdnb-building-list { margin: 18px 24px; }
.bdnb-building-list summary b {
  float: right;
  display: grid;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #e8efe9;
  color: #285442;
}
.bdnb-building-list > div { padding: 0 10px 10px; }
.bdnb-building-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 7px;
  border-top: 1px solid #eee8dd;
}
.bdnb-building-row.is-target {
  margin-top: 2px;
  border: 1px solid #ddc492;
  border-radius: 10px;
  background: #fff7e8;
}
.bdnb-building-distance {
  color: #a2681d;
  font-size: 9px;
  font-weight: 850;
}
.bdnb-building-row strong,
.bdnb-building-row small {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.bdnb-building-row strong { font-size: 10px; }
.bdnb-building-row small {
  margin-top: 2px;
  color: #77827b;
  font-size: 8px;
}

.bdnb-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 24px 20px;
  padding: 11px 13px;
  border: 1px solid #dfcfaa;
  border-radius: 11px;
  background: #fff7e6;
  color: #263f35;
}
.bdnb-note > span,
.bdnb-error > span {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e9efe9;
  color: #2b5d49;
  font-size: 11px;
  font-weight: 900;
}
.bdnb-note > span {
  margin-top: 1px;
  background: #285442;
  color: #fff8e9;
}
.bdnb-note p {
  margin: 0;
  color: #263f35;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.55;
}

.bdnb-loading,
.bdnb-error,
.bdnb-target-empty {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 24px;
}
.bdnb-loading > span {
  width: 30px;
  height: 30px;
  border: 3px solid #dfe7e1;
  border-top-color: #b97825;
  border-radius: 50%;
  animation: bdnb-spin .8s linear infinite;
}
.bdnb-loading strong,
.bdnb-loading small,
.bdnb-error strong,
.bdnb-error p,
.bdnb-target-empty strong,
.bdnb-target-empty p {
  display: block;
  overflow-wrap: break-word;
  word-break: normal;
}
.bdnb-loading strong,
.bdnb-error strong,
.bdnb-target-empty strong { font-size: 12px; }
.bdnb-loading small,
.bdnb-error p,
.bdnb-target-empty p {
  margin: 3px 0 0;
  color: #758078;
  font-size: 10px;
  line-height: 1.45;
}
.bdnb-error button {
  margin-top: 9px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: #1d4a3a;
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

@keyframes bdnb-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .bdnb-heading {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }
  .bdnb-source-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .bdnb-target,
  .bdnb-neighborhood { padding: 18px; }
  .bdnb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bdnb-neighborhood { grid-template-columns: 1fr; }
  .bdnb-building-list { margin: 16px 18px; }
  .bdnb-note { margin: 0 18px 18px; }
}

@media (max-width: 480px) {
  .bdnb-heading-icon { width: 40px; height: 40px; }
  .bdnb-facts,
  .bdnb-sector-kpis,
  .bdnb-technical-details dl { grid-template-columns: 1fr; }
  .bdnb-detail:nth-last-child(-n+2) { border-bottom: 1px solid #eee8dc; }
  .bdnb-detail:last-child { border-bottom: 0; }
  .bdnb-building-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }
}
