@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

.pdw-widget {
  --pdw-page-bg: #f5f7fb;
  --pdw-text: #4F596A;
  --pdw-muted: #657084;
  --pdw-border: #e3e9f2;
  --pdw-card: #ffffff;
  --pdw-panel: #f8fafc;
  --pdw-track: #e8edf5;
}

.pdw-widget,
.pdw-widget * {
  box-sizing: border-box;
}

.pdw-widget,
.pdw-widget * {
  box-sizing: border-box;
}

.pdw-widget {
  container-name: pdw-widget;
  container-type: inline-size;
  --pdw-primary: #607eb8;
  --pdw-soft: color-mix(in srgb, var(--pdw-primary) 11%, white);
  --pdw-softer: color-mix(in srgb, var(--pdw-primary) 6%, white);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  color: var(--pdw-text);
  border: 1px solid var(--pdw-border);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.10);
  font-family: var(--pdw-font, "Poppins", sans-serif);
}

.pdw-widget.pdw-flat {
  box-shadow: none;
}

.pli-load-error {
  min-height: 220px;
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  color: #4F596A;
  background: #fff;
  border: 1px solid #E5E9F0;
  border-radius: 14px;
  text-align: center;
  font-family: var(--pdw-font, "Poppins", sans-serif);
}

.pli-load-error strong {
  display: block;
  margin: 0;
  color: #4F596A;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.pli-load-error p {
  max-width: 360px;
  margin: 0;
  color: #657084;
  font-size: 13px;
  line-height: 1.55;
}

.pdw-topline {
  display: none !important;
  height: 0 !important;
  background: transparent !important;
}

.pdw-header {
  padding: 26px 24px 12px;
}

.pdw-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.pdw-header h2 {
  margin: 0;
  color: var(--pdw-text);
  font-size: var(--pdw-title-font-size, 30px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.pdw-radius-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 2px;
  padding: 7px 15px;
  color: var(--pdw-primary);
  background: var(--pdw-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.pdw-description {
  margin: 7px 0 0;
  color: var(--pdw-muted);
  font-size: 14px;
  line-height: 1.45;
}

.pdw-community-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 13px;
}

.pdw-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f5d73;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.pdw-highlight-item:not(:first-child)::before {
    width: 5px;
    height: 5px;
    content: "";
    background: color-mix(in srgb, var(--pdw-primary) 65%, white);
    border-radius: 50%;
    margin-left: -7px;
}

.pdw-view-frame {
  width: 100%;
  min-width: 0;
}

/* CATEGORY NAVIGATION */
.pdw-more-box {
  position: relative;
  width: 100%;
}

.pdw-category-carousel {
  padding: 8px 24px 0;
}

.pdw-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid var(--pdw-border);
}

.pdw-category {
  appearance: none;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 72px;
  padding: 10px 8px 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #657084;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.pdw-category:hover,
.pdw-category.is-active {
  color: var(--pdw-primary);
}

.pdw-category.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  content: "";
  background: var(--pdw-primary);
  border-radius: 999px 999px 0 0;
}

.pdw-category-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
}

.pdw-category-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.pdw-category-nav,
.pdw-stats-nav,
.pdw-category-select-wrap {
  display: none;
}

/* DEFAULT SUMMARY CARDS */
.pdw-content-area {
  width: 100%;
  min-width: 0;
}

.pdw-stats-carousel {
  width: 100%;
  min-width: 0;
  padding: 14px 24px 6px;
}

.pdw-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.pdw-stat-card {
  display: flex;
  min-width: 0;
  min-height: 88px;
  padding: 11px 12px;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--pdw-border);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.045);
}

.pdw-stat-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.pdw-stat-icon {
  display: inline-flex;
  width: 30px;
  height: 32px;
  min-width: 30px;
  align-items: center;
  justify-content: center;
  color: var(--pdw-primary);
  background: var(--pdw-soft);
  border-radius: 10px;
}

.pdw-stat-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.pdw-stat-value {
  min-width: 0;
  overflow: hidden;
  color: var(--pdw-text);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdw-stat-label {
  margin-top: 5px;
  overflow: hidden;
  color: #657084;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* DEFAULT INSIGHT CARDS */
.pdw-default-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 10px 24px 8px;
}

.pdw-insight-card {
  display: flex;
  min-width: 0;
  min-height: 148px;
  padding: 22px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--pdw-panel);
  border: 1px solid var(--pdw-border);
  border-radius: 18px;
}

.pdw-insight-copy {
  min-width: 0;
}

.pdw-insight-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--pdw-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pdw-insight-card h3 {
  margin: 0;
  color: var(--pdw-text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.pdw-insight-card p {
  margin: 7px 0 0;
  color: var(--pdw-muted);
  font-size: 11px;
  line-height: 1.35;
}

.pdw-tenure-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 11px;
}

.pdw-tenure-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475467;
  font-size: 10px;
  white-space: nowrap;
}

.pdw-tenure-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.pdw-tenure-legend .is-owner {
  background: var(--pdw-primary);
}

.pdw-tenure-legend .is-renter {
  background: #dfe5ef;
}

.pdw-donut,
.pdw-progress-ring {
  position: relative;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border-radius: 50%;
}

.pdw-donut {
  background:
    conic-gradient(
      var(--pdw-primary) calc(var(--pdw-owner) * 1%),
      #dfe5ef 0
    );
}

.pdw-progress-ring {
  background:
    conic-gradient(
      var(--pdw-primary) calc(var(--pdw-progress) * 1%),
      #dfe5ef 0
    );
}

.pdw-donut::after,
.pdw-progress-ring::after {
  position: absolute;
  inset: 11px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.pdw-donut-center,
.pdw-progress-center {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.pdw-donut-center strong,
.pdw-progress-center strong {
  color: var(--pdw-text);
  font-size: 15px;
  line-height: 1;
}

.pdw-donut-center span,
.pdw-progress-center span {
  margin-top: 3px;
  color: #657084;
  font-size: 8px;
  line-height: 1;
}

/* DETAIL VIEW */
.pdw-tab-panel {
  width: 100%;
  padding: 8px 24px 16px;
}

.pdw-panel-toolbar {
  display: flex;
  min-height: 38px;
  margin-bottom: 12px;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.pdw-panel-toolbar > strong {
  color: var(--pdw-text);
  font-size: 14px;
}

.pdw-back-button {
  appearance: none;
  padding: 0;
  color: var(--pdw-primary);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, opacity .18s ease;
}

.pdw-back-button:hover{
  color: color-mix(in srgb, var(--pdw-primary) 75%, black);
}

.pdw-back-button:active{
  opacity:.75;
}

.pdw-back-button:focus-visible{
  outline:none;
  color: color-mix(in srgb, var(--pdw-primary) 75%, black);
}

.pdw-panel-card {
  min-width: 0;
  padding: 22px;
  background: var(--pdw-panel);
  border: 1px solid var(--pdw-border);
  border-radius: 18px;
}

.pdw-panel-card h4,
.pdw-panel-card h5 {
  margin: 0 0 18px;
  color: var(--pdw-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pdw-panel-card h4 {
  font-size: 16px;
}

.pdw-panel-card h5 {
  font-size: 14px;
}

.pdw-split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.pdw-mini-grid {
  display: grid;
  gap: 10px;
}

.pdw-mini-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdw-mini-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pdw-mini-stat {
  min-width: 0;
  min-height: 82px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--pdw-border);
  border-radius: 14px;
}

.pdw-mini-stat-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.pdw-mini-stat-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  color: var(--pdw-primary);
  background: var(--pdw-soft);
  border-radius: 9px;
}

.pdw-mini-stat-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.pdw-mini-stat strong {
  min-width: 0;
  overflow: hidden;
  color: var(--pdw-text);
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdw-mini-stat small {
  display: block;
  margin-top: 7px;
  color: var(--pdw-muted);
  font-size: 9px;
  font-weight: 500;
}

.pdw-mini-stat em {
  display: block;
  margin-top: 3px;
  color: var(--pdw-muted);
  font-size: 8px;
  font-style: normal;
}

.pdw-bar-row + .pdw-bar-row {
  margin-top: 14px;
}

.pdw-bar-label {
  display: flex;
  margin-bottom: 6px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #657084;      /* same as overview labels */
  font-size: 10px;
  font-weight: 500;   
  line-height: 1.25; 
}

.pdw-bar-label strong {
  color: var(--pdw-text);
}

.pdw-bar-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-bar-track i {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

/* ECONOMY */
.pdw-economy-panel {
  display: grid;
  gap: 14px;
}

.pdw-economy-stats {
  width: 100%;
}

.pdw-employment-donut-layout,
.pdw-move-donut-layout {
  display: flex;
  align-items: center;
  gap: 22px;
}

.pdw-employment-donut,
.pdw-move-donut {
  position: relative;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  border-radius: 50%;
}

.pdw-employment-donut::after,
.pdw-move-donut::after {
  position: absolute;
  inset: 18px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.pdw-employment-donut-center,
.pdw-move-donut-center {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.pdw-employment-donut-center strong,
.pdw-move-donut-center strong {
  font-size: 14px;
}

.pdw-employment-donut-center span,
.pdw-move-donut-center span {
  margin-top: 3px;
  color: var(--pdw-muted);
  font-size: 9px;
}

.pdw-employment-legend,
.pdw-move-donut-legend {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.pdw-employment-legend-item,
.pdw-move-donut-legend > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #475467;
  font-size: 9px;
}

.pdw-employment-legend-item i,
.pdw-move-donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* HOUSEHOLDS */
.pdw-households-layout {
  display: grid;
  gap: 14px;
}

.pdw-households-top-row,
.pdw-households-bottom-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pdw-households-top-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pdw-tenure-top-card {
  min-width: 0;
  padding: 18px 20px;
  background: var(--pdw-panel);
  border: 1px solid var(--pdw-border);
  border-radius: 18px;
}

.pdw-tenure-top-heading,
.pdw-tenure-top-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pdw-tenure-top-heading {
  color: #344054;
  font-size: 11px;
}

.pdw-tenure-top-heading strong {
  color: var(--pdw-text);
}

.pdw-tenure-gauge {
  display: flex;
  height: 10px;
  margin: 15px 0 8px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-tenure-gauge .is-owner {
  background: var(--pdw-primary);
}

.pdw-tenure-gauge .is-renter {
  background: #dfe5ef;
}

.pdw-tenure-top-labels {
  color: var(--pdw-muted);
  font-size: 9px;
}

.pdw-home-lollipop {
  display: grid;
  gap: 13px;
}

.pdw-lollipop-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: #475467;
  font-size: 9px;
}

.pdw-lollipop-row strong {
  color: var(--pdw-text);
  text-align: right;
}

.pdw-lollipop-track {
  position: relative;
  height: 5px;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-lollipop-track i {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

.pdw-lollipop-track b {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 3px solid var(--pdw-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* EDUCATION */
.pdw-education-attainment-heading {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  gap: 10px;
}

.pdw-education-attainment-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--pdw-primary);
  background: var(--pdw-soft);
  border-radius: 11px;
}

.pdw-education-attainment-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.pdw-education-attainment-heading h5 {
  margin: 0;
}

.pdw-education-attainment {
  display: grid;
  gap: 13px;
}

.pdw-education-attainment-label {
  display: flex;
  margin-bottom: 6px;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
  font-size: 10px;
}

.pdw-education-attainment-label strong {
  color: var(--pdw-text);
}

.pdw-education-attainment-track {
  height: 8px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-education-attainment-track i {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

/* LANGUAGES / DIVERSITY */
.pdw-languages-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.pdw-language-bars {
  display: grid;
  gap: 14px;
}

.pdw-language-label {
  display: flex;
  margin-bottom: 6px;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
  font-size: 10px;
}

.pdw-language-label strong {
  color: var(--pdw-text);
}

.pdw-language-track {
  height: 8px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-language-track i {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

.pdw-ethnicity-stack {
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
}

.pdw-ethnicity-stack span:nth-child(7n+1),
.pdw-ethnicity-item:nth-child(7n+1) i { background: var(--pdw-primary); }
.pdw-ethnicity-stack span:nth-child(7n+2),
.pdw-ethnicity-item:nth-child(7n+2) i { background: color-mix(in srgb, var(--pdw-primary) 82%, white); }
.pdw-ethnicity-stack span:nth-child(7n+3),
.pdw-ethnicity-item:nth-child(7n+3) i { background: color-mix(in srgb, var(--pdw-primary) 67%, white); }
.pdw-ethnicity-stack span:nth-child(7n+4),
.pdw-ethnicity-item:nth-child(7n+4) i { background: color-mix(in srgb, var(--pdw-primary) 52%, white); }
.pdw-ethnicity-stack span:nth-child(7n+5),
.pdw-ethnicity-item:nth-child(7n+5) i { background: color-mix(in srgb, var(--pdw-primary) 40%, white); }
.pdw-ethnicity-stack span:nth-child(7n+6),
.pdw-ethnicity-item:nth-child(7n+6) i { background: color-mix(in srgb, var(--pdw-primary) 29%, white); }
.pdw-ethnicity-stack span:nth-child(7n+7),
.pdw-ethnicity-item:nth-child(7n+7) i { background: color-mix(in srgb, var(--pdw-primary) 18%, white); }

.pdw-ethnicity-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  margin-top: 18px;
}

.pdw-ethnicity-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #475467;
  font-size: 9px;
}

.pdw-ethnicity-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* COMMUTE */
.pdw-commute-list {
  display: grid;
  gap: 18px;
}

.pdw-commute-item {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 14px;
}

.pdw-commute-label-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 10px;
}

.pdw-commute-origin {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--pdw-primary);
  background: var(--pdw-soft);
  border-radius: 8px;
}

.pdw-commute-origin svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.pdw-commute-route {
  position: relative;
  height: 5px;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-commute-fill {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

.pdw-commute-marker {
  position: absolute;
  top: 50%;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--pdw-primary);
  background: #fff;
  border: 2px solid var(--pdw-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pdw-commute-marker svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.pdw-commute-percent {
  color: var(--pdw-text);
  font-size: 11px;
  text-align: right;
}

/* MAP */
.pdw-map-card {
  width: auto;
  margin: 0px 24px 12px;
  overflow: hidden;
  border: 1px solid var(--pdw-border);
  border-radius: 18px;
}

.pdw-map-wrap {
  position: relative;
  width: 100%;
  min-height: 250px;
  overflow: hidden;
  background: #eef2f7;
}

.pdw-map {
  position: absolute;
  inset: 0;
}

.pdw-map-context {
  position: absolute;
  z-index: 500;
  top: 14px;
  left: 14px;
  display: flex;
  min-width: 132px;
  padding: 11px 13px;
  flex-direction: column;
  gap: 3px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(227,233,242,.95);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16,24,40,.08);
}

.pdw-map-context strong {
  color: var(--pdw-text);
  font-size: 11px;
}

.pdw-map-context span {
  color: var(--pdw-primary);
  font-size: 10px;
  font-weight: 700;
}

.pdw-map-fallback {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--pdw-muted);
  font-size: 12px;
}

.pdw-map .leaflet-top,
.pdw-map .leaflet-bottom {
  z-index: 650;
}

.pdw-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(213,219,230,.95) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(21,32,51,.14) !important;
}

.pdw-map .leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  border: 0 !important;
  color: #26364f !important;
  background: rgba(255,255,255,.96) !important;
  font-family: var(--pdw-font) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.pdw-map .leaflet-control-zoom a + a {
  border-top: 1px solid rgba(213,219,230,.95) !important;
}


.pdw-map .leaflet-control-attribution {
  padding: 3px 8px !important;
  border-radius: 999px 0 0 0 !important;
  background: rgba(255,255,255,.88) !important;
  color: #657084 !important;
  box-shadow: 0 4px 14px rgba(21,32,51,.08) !important;
  font-size: 10px !important;
}

.pdw-map .leaflet-control-attribution a {
  color: #657084 !important;
  text-decoration: none !important;
}

.pdw-map .leaflet-control-attribution a:hover {
  color: var(--pdw-primary) !important;
}

.pdw-attribution-toggle {
  display: none;
}

.pdw-attribution-content {
  display: inline;
}

@container (max-width: 640px) {
  .pdw-map .leaflet-control-attribution {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    overflow: visible !important;
    border-radius: 14px 0 0 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .pdw-map .leaflet-bottom.leaflet-right {
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    pointer-events: none;
  }

  .pdw-map .leaflet-bottom.leaflet-right .leaflet-control-attribution {
    pointer-events: auto;
  }

  .pdw-map .pdw-attribution-toggle {
    position: relative !important;
    z-index: 2 !important;
    display: flex;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 14px 0 0 0;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.94);
    color: #657084;
    box-shadow: 0 4px 14px rgba(21,32,51,.10);
    font: 700 14px/1 var(--pdw-font);
    cursor: pointer;
  }

  .pdw-map .pdw-attribution-content {
    position: absolute !important;
    right: 28px !important;
    bottom: 0 !important;
    left: 0 !important;
    display: flex !important;
    width: auto !important;
    height: 28px !important;
    max-width: none !important;
    padding: 0 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
    border-radius: 8px 0 0 0 !important;
    background: rgba(255,255,255,.96) !important;
    color: #657084 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-align: right !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  }

  .pdw-map .pdw-attribution-content a {
    flex: 0 0 auto;
    white-space: nowrap !important;
  }

  .pdw-map .pdw-attribution-content a:last-child {
    margin-left: 6px !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-toggle {
    color: var(--pdw-primary);
  }
}

/* POWERED BY */
.pdw-powered {
  display: flex;
  min-height: 30px;
  padding: 0 24px 12px;
  align-items: center;
  justify-content: flex-end;
}

.pdw-powered a {
  display: inline-flex;
  align-items: center;
}

.pdw-powered-logo {
  display: block;
  width: auto;
  height: 25px;
  max-width: 150px;
}

@container pdw-widget (max-width: 700px) {
  .pdw-powered-logo {
    height: 20px !important;
  }
}

/* DESKTOP WIDTH SAFETY */
@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pdw-header,
  .pdw-category-carousel,
  .pdw-tab-panel {
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdw-stats-carousel {
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdw-default-insights {
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdw-map-card {
    margin-left: 24px;
    margin-right: 24px;
  }

  .pdw-powered {
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdw-stats {
    gap: 9px;
  }

  .pdw-stat-card {
    min-height: 92px;
    padding: 13px 10px;
  }

  .pdw-stat-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .pdw-insight-card {
    padding: 18px;
  }
}


@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pdw-stat-value {
    font-size: 15px;
  }
}
/* Restored flat category navigation: stacked icon, label, animated underline */
.pdw-view-frame.is-summary-view .pdw-more-box {
  margin: 0 24px 16px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pdw-view-frame.is-summary-view .pdw-more-header {
  display: none !important;
}

.pdw-view-frame.is-summary-view .pdw-category-carousel {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--pdw-border) !important;
  overflow: visible !important;
}

.pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  width: 100% !important;
  gap: 0 !important;
}

.pdw-view-frame.is-summary-view .pdw-category,
.pdw-view-frame.is-summary-view .pdw-category:first-child,
.pdw-view-frame.is-summary-view .pdw-category:last-child {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 58px !important;
  min-height: 62px !important;
  padding: 8px 4px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #657084 !important;
  transform: none !important;
  transition: color .18s ease !important;
}

.pdw-view-frame.is-summary-view .pdw-category:first-child {
  justify-self: start !important;
}

.pdw-view-frame.is-summary-view .pdw-category:last-child {
  justify-self: end !important;
}

.pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
  justify-self: center !important;
}

.pdw-view-frame.is-summary-view .pdw-category-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: currentColor !important;
  line-height: 1 !important;
}

.pdw-view-frame.is-summary-view .pdw-category-icon svg {
  width: 20px !important;
  height: 10px !important;
}

.pdw-view-frame.is-summary-view .pdw-category > span:last-child {
  display: block !important;
  min-height: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap !important;
  transition: color .18s ease, font-weight .18s ease !important;
}

.pdw-view-frame.is-summary-view .pdw-category::after,
.pdw-view-frame.is-summary-view .pdw-category:first-child::after,
.pdw-view-frame.is-summary-view .pdw-category:last-child::after {
  content: "" !important;
  position: absolute !important;
  left: 15% !important;
  right: 15% !important;
  bottom: -1px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--pdw-primary) !important;
  opacity: 0 !important;
  transform: scaleX(0) !important;
  transform-origin: center !important;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--pdw-primary) 28%, transparent) !important;
  transition: transform .2s ease, opacity .2s ease !important;
}

.pdw-view-frame.is-summary-view .pdw-category:hover,
.pdw-view-frame.is-summary-view .pdw-category.is-active {
  border: 0 !important;
  background: transparent !important;
  color: var(--pdw-primary) !important;
  box-shadow: none !important;
  transform: none !important;
}

.pdw-view-frame.is-summary-view .pdw-category:hover > span:last-child,
.pdw-view-frame.is-summary-view .pdw-category.is-active > span:last-child {
  font-weight: 600 !important;
}

.pdw-view-frame.is-summary-view .pdw-category:hover::after,
.pdw-view-frame.is-summary-view .pdw-category.is-active::after {
  opacity: 1 !important;
  transform: scaleX(1) !important;
}

.pdw-view-frame.is-summary-view .pdw-category:hover .pdw-category-icon,
.pdw-view-frame.is-summary-view .pdw-category.is-active .pdw-category-icon {
  background: transparent !important;
  color: var(--pdw-primary) !important;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin-left: 20px !important;
    margin-right: 20px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel::-webkit-scrollbar {
    display: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    display: flex !important;
    width: max-content !important;
    min-width: 100% !important;
    gap: 2px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child {
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px !important;
    min-height: 58px !important;
    padding: 8px 4px 10px !important;
    justify-self: auto !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category > span:last-child {
    font-size: 12px !important;
  }
}

/* Category navigation alignment refinements */
.pdw-view-frame.is-summary-view .pdw-category-carousel {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

.pdw-view-frame.is-summary-view .pdw-category,
.pdw-view-frame.is-summary-view .pdw-category:first-child,
.pdw-view-frame.is-summary-view .pdw-category:last-child,
.pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
  width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch !important;
}

.pdw-view-frame.is-summary-view .pdw-category::after,
.pdw-view-frame.is-summary-view .pdw-category:first-child::after,
.pdw-view-frame.is-summary-view .pdw-category:last-child::after {
  left: 8% !important;
  right: 8% !important;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    width: 82px !important;
    min-width: 82px !important;
    justify-self: auto !important;
  }
}

/* Keep the category divider aligned to the same inner width as the content above */
.pdw-view-frame.is-summary-view .pdw-more-box {
  margin-left: 24px !important;
  margin-right: 24px !important;
}

.pdw-view-frame.is-summary-view .pdw-category-carousel {
  width: 100% !important;
  margin: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  border-bottom: 1px solid var(--pdw-border) !important;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin-left: 20px !important;
    margin-right: 20px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


/* Shorten divider to match content width */
.pdw-view-frame.is-summary-view .pdw-category-carousel{
    border-bottom:none !important;
}
.pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories{
    border-bottom:1px solid var(--pdw-border) !important;
    width:calc(100% - 24px) !important;
    margin:0 auto !important;
}
@container pdw-widget (max-width: 700px){
.pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories{
width:100% !important;
}
}


/* Compact category detail panels so opening a category does not increase widget height. */
.pdw-tab-panel {
  padding-top: 4px;
  padding-bottom: 12px;
}

.pdw-panel-toolbar {
  min-height: 28px;
  margin-bottom: 7px;
}

.pdw-panel-card {
  padding: 14px 16px;
}

.pdw-panel-card h4,
.pdw-panel-card h5 {
  margin-bottom: 10px;
}

.pdw-split-panel,
.pdw-economy-panel,
.pdw-households-layout,
.pdw-households-top-row,
.pdw-households-bottom-row,
.pdw-languages-layout {
  gap: 9px;
}

.pdw-mini-grid {
  gap: 7px;
}

.pdw-mini-stat {
  min-height: 62px;
  padding: 9px 11px;
}

.pdw-mini-stat-row {
  gap: 6px;
}

.pdw-mini-stat-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 8px;
}

.pdw-mini-stat-icon svg {
  width: 13px;
  height: 13px;
}

.pdw-mini-stat strong {
  font-size: 15px;
}

.pdw-mini-stat small {
  margin-top: 4px;
  font-size: 8px;
}

.pdw-mini-stat em {
  margin-top: 1px;
  font-size: 7px;
}

.pdw-bar-row + .pdw-bar-row {
  margin-top: 9px;
}

.pdw-bar-label,
.pdw-education-attainment-label,
.pdw-language-label {
  margin-bottom: 4px;
}

.pdw-bar-track,
.pdw-education-attainment-track,
.pdw-language-track {
  height: 6px;
}

.pdw-employment-donut-layout,
.pdw-move-donut-layout {
  gap: 14px;
}

.pdw-employment-donut,
.pdw-move-donut {
  width: 94px;
  height: 94px;
  flex-basis: 94px;
}

.pdw-employment-donut::after,
.pdw-move-donut::after {
  inset: 14px;
}

.pdw-employment-legend,
.pdw-move-donut-legend {
  gap: 5px;
}

.pdw-tenure-top-card {
  padding: 12px 14px;
}

.pdw-tenure-gauge {
  margin: 9px 0 6px;
}

.pdw-home-lollipop {
  gap: 8px;
}

.pdw-lollipop-row {
  gap: 7px;
}

.pdw-education-attainment-heading {
  margin-bottom: 10px;
}

.pdw-education-attainment-icon {
  width: 30px;
  height: 30px;
}

.pdw-education-attainment {
  gap: 8px;
}

.pdw-language-bars {
  gap: 9px;
}

.pdw-ethnicity-stack {
  height: 14px;
}

.pdw-ethnicity-legend {
  gap: 6px 12px;
  margin-top: 10px;
}

.pdw-commute-list {
  gap: 11px;
}

.pdw-commute-item {
  gap: 10px;
}

@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pdw-tab-panel {
    padding-top: 2px;
    padding-bottom: 10px;
  }

  .pdw-panel-card {
    padding: 12px 14px;
  }

  .pdw-panel-toolbar {
    min-height: 26px;
    margin-bottom: 6px;
  }

  .pdw-mini-stat {
    min-height: 58px;
    padding: 8px 9px;
  }

  .pdw-employment-donut,
  .pdw-move-donut {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
  }
}

@container pdw-widget (max-width: 700px) {
  .pdw-tab-panel {
    padding: 2px 20px 9px;
  }

  .pdw-panel-card {
    padding: 10px 11px;
    border-radius: 14px;
  }

  .pdw-panel-card h4,
  .pdw-panel-card h5 {
    margin-bottom: 7px;
  }

  .pdw-panel-card h4 {
    font-size: 14px;
  }

  .pdw-panel-card h5 {
    font-size: 12px;
  }

  .pdw-split-panel,
  .pdw-households-top-row,
  .pdw-households-bottom-row,
  .pdw-languages-layout {
    gap: 7px;
  }

  .pdw-mini-grid {
    gap: 6px;
  }

  .pdw-mini-stat {
    min-height: 52px;
    padding: 7px 8px;
  }

  .pdw-mini-stat strong {
    font-size: 13px;
  }

  .pdw-employment-donut,
  .pdw-move-donut {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
  }

  .pdw-employment-donut::after,
  .pdw-move-donut::after {
    inset: 11px;
  }

  .pdw-commute-list {
    gap: 8px;
  }

  .pdw-commute-item {
    grid-template-columns: 108px minmax(0, 1fr) 40px;
    gap: 7px;
  }
}


/* Keep every category view exactly the same height as the summary view. */
.pdw-view-frame {
  position: relative;
}

.pdw-view-measurement {
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pdw-view-frame.is-detail-view .pdw-tab-panel {
  transform: scale(var(--pdw-detail-scale, 1));
  transform-origin: top left;
  overflow: visible;
}

/* Final compacting pass: keeps scaling minimal while preserving all content. */
.pdw-view-frame.is-detail-view .pdw-tab-panel {
  padding-top: 2px;
  padding-bottom: 8px;
}

.pdw-view-frame.is-detail-view .pdw-panel-toolbar {
  min-height: 24px;
  margin-bottom: 5px;
}

.pdw-view-frame.is-detail-view .pdw-panel-card {
  padding: 11px 13px;
}

.pdw-view-frame.is-detail-view .pdw-panel-card h4,
.pdw-view-frame.is-detail-view .pdw-panel-card h5 {
  margin-bottom: 7px;
}

.pdw-view-frame.is-detail-view .pdw-split-panel,
.pdw-view-frame.is-detail-view .pdw-economy-panel,
.pdw-view-frame.is-detail-view .pdw-households-layout,
.pdw-view-frame.is-detail-view .pdw-households-top-row,
.pdw-view-frame.is-detail-view .pdw-households-bottom-row,
.pdw-view-frame.is-detail-view .pdw-languages-layout {
  gap: 7px;
}

.pdw-view-frame.is-detail-view .pdw-mini-grid {
  gap: 5px;
}

.pdw-view-frame.is-detail-view .pdw-mini-stat {
  min-height: 52px;
  padding: 7px 9px;
}

.pdw-view-frame.is-detail-view .pdw-mini-stat small {
  margin-top: 3px;
}

.pdw-view-frame.is-detail-view .pdw-bar-row + .pdw-bar-row {
  margin-top: 7px;
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop,
.pdw-view-frame.is-detail-view .pdw-education-attainment,
.pdw-view-frame.is-detail-view .pdw-language-bars,
.pdw-view-frame.is-detail-view .pdw-commute-list {
  gap: 7px;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-heading,
.pdw-view-frame.is-detail-view .pdw-ethnicity-legend {
  margin-bottom: 7px;
  margin-top: 7px;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-tab-panel {
    padding-right: 20px;
    padding-left: 20px;
  }
}


/* Stretch category content so the lowest grey boxes align with the map using the same bottom gap as the summary view. */
.pdw-view-frame.is-detail-view .pdw-tab-panel {
  display: flex;
  flex-direction: column;
}

.pdw-view-frame.is-detail-view .pdw-panel-toolbar {
  flex: 0 0 auto;
}

.pdw-view-frame.is-detail-view .pdw-tab-panel > :not(.pdw-panel-toolbar) {
  flex: 1 1 auto;
  min-height: 0;
}

.pdw-view-frame.is-detail-view .pdw-split-panel,
.pdw-view-frame.is-detail-view .pdw-economy-panel,
.pdw-view-frame.is-detail-view .pdw-households-layout,
.pdw-view-frame.is-detail-view .pdw-languages-layout {
  height: 100%;
}

.pdw-view-frame.is-detail-view .pdw-split-panel > .pdw-panel-card,
.pdw-view-frame.is-detail-view .pdw-languages-layout > .pdw-panel-card,
.pdw-view-frame.is-detail-view .pdw-education-attainment-card,
.pdw-view-frame.is-detail-view .pdw-commute-card {
  height: 100%;
}

.pdw-view-frame.is-detail-view .pdw-economy-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.pdw-view-frame.is-detail-view .pdw-economy-visuals,
.pdw-view-frame.is-detail-view .pdw-households-bottom-row {
  min-height: 0;
}

.pdw-view-frame.is-detail-view .pdw-households-layout {
  grid-template-rows: auto minmax(0, 1fr);
}

.pdw-view-frame.is-detail-view .pdw-households-bottom-row > .pdw-panel-card,
.pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-panel-card {
  height: 100%;
}

/* PEOPLE: let the six overview tiles expand or contract evenly to fill the card. */
.pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-two {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-stat {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  justify-content: center;
}

/* ALL CATEGORY SUMMARY CARDS: use the same typography as Population Overview. */
.pdw-view-frame.is-detail-view .pdw-mini-stat strong {
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
}

.pdw-view-frame.is-detail-view .pdw-mini-stat small {
  margin-top: 8px !important;
  color: #657084 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.pdw-view-frame.is-detail-view .pdw-mini-stat em {
  margin-top: 3px !important;
  color: #657084 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  line-height: 1.25 !important;
}

@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pdw-view-frame.is-detail-view .pdw-mini-stat strong {
    font-size: 15px !important;
  }
}

/* STANDARDIZED BAR CHART LABELS: Age, Income, Education and Languages */
.pdw-bar-label,
.pdw-education-attainment-label,
.pdw-language-label {
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.pdw-bar-label strong,
.pdw-education-attainment-label strong,
.pdw-language-label strong {
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

/* FILL AVAILABLE GRAPH AREA: distribute chart rows evenly within every graph card. */
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-bar-row),
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-education-attainment),
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-language-bars),
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-home-lollipop),
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-commute-list) {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-bar-row) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-bar-row) > h5,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-education-attainment) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-education-attainment) > h5,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-language-bars) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-language-bars) > h5,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-home-lollipop) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-home-lollipop) > h5,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-commute-list) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-commute-list) > h5 {
  flex: 0 0 auto;
}

/* Age and income bar charts */
.pdw-view-frame.is-detail-view .pdw-panel-card:has(> .pdw-bar-row) {
  justify-content: flex-start;
}

.pdw-view-frame.is-detail-view .pdw-panel-card:has(> .pdw-bar-row) > .pdw-bar-row {
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
}

.pdw-view-frame.is-detail-view .pdw-panel-card:has(> .pdw-bar-row) > .pdw-bar-row + .pdw-bar-row {
  margin-top: 0;
}

/* Education, languages, housing and commute graphs */
.pdw-view-frame.is-detail-view .pdw-education-attainment,
.pdw-view-frame.is-detail-view .pdw-language-bars,
.pdw-view-frame.is-detail-view .pdw-home-lollipop,
.pdw-view-frame.is-detail-view .pdw-commute-list {
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  align-content: stretch;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.pdw-view-frame.is-detail-view .pdw-language-bars {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop {
  grid-auto-rows: minmax(0, 1fr);
}

.pdw-view-frame.is-detail-view .pdw-commute-list {
  grid-auto-rows: minmax(0, 1fr);
}

.pdw-view-frame.is-detail-view .pdw-education-attainment > div,
.pdw-view-frame.is-detail-view .pdw-language-bars > div,
.pdw-view-frame.is-detail-view .pdw-home-lollipop > .pdw-lollipop-row,
.pdw-view-frame.is-detail-view .pdw-commute-list > .pdw-commute-item {
  align-self: center;
  width: 100%;
}

/* EMPLOYMENT GRAPH: match standardized chart typography and fill available space. */
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-employment-donut-layout) {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-employment-donut-layout) > h4,
.pdw-view-frame.is-detail-view .pdw-panel-card:has(.pdw-employment-donut-layout) > h5 {
  flex: 0 0 auto;
}

.pdw-view-frame.is-detail-view .pdw-employment-donut-layout {
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
}

.pdw-view-frame.is-detail-view .pdw-employment-donut {
  width: clamp(86px, 12cqi, 126px);
  height: clamp(86px, 12cqi, 126px);
  flex: 0 0 clamp(86px, 12cqi, 126px);
}

.pdw-view-frame.is-detail-view .pdw-employment-legend {
  display: grid;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 0;
}

.pdw-view-frame.is-detail-view .pdw-employment-legend-item {
  align-self: center;
  width: 100%;
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.pdw-view-frame.is-detail-view .pdw-employment-legend-item strong,
.pdw-view-frame.is-detail-view .pdw-employment-legend-item span {
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.pdw-view-frame.is-detail-view .pdw-employment-donut-center strong {
  font-size: 15px;
  font-weight: 700;
}

.pdw-view-frame.is-detail-view .pdw-employment-donut-center span {
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

/* EMPLOYMENT GRAPH: tighten legend spacing while keeping the graph vertically centered. */
.pdw-view-frame.is-detail-view .pdw-employment-legend {
  height: auto;
  align-content: center;
  justify-content: center;
  grid-auto-rows: auto;
  gap: 6px;
}

.pdw-view-frame.is-detail-view .pdw-employment-legend-item {
  align-self: auto;
}

/* EMPLOYMENT GRAPH: slightly increase spacing between legend labels. */
.pdw-view-frame.is-detail-view .pdw-employment-legend {
  gap: 9px;
}



/* OWNER / RENTER BAR */
.pdw-tenure-gauge{
    position:relative;
    overflow:hidden;
}

/* white divider at owner/renter split */
.pdw-tenure-gauge::after{
    content:"";
    position:absolute;
    top:-2px;
    bottom:-2px;
    left:var(--pdw-owner,50%);
    width:2px;
    background:#fff;
    transform:translateX(-1px);
    border-radius:2px;
    z-index:2;
}

/* Standard label typography */
.pdw-tenure-top-heading,
.pdw-tenure-top-labels{
    font-size:11px !important;
    font-weight:600 !important;
    color:#657084 !important;
    line-height:1.25 !important;
}

.pdw-tenure-top-heading strong,
.pdw-tenure-top-labels strong{
    font-size:11px !important;
    font-weight:600 !important;
    color:#657084 !important;
}


/* HOME TYPE: restore the earlier clean horizontal-bar treatment with full labels. */
.pdw-home-lollipop {
  display: grid;
  gap: 9px;
}

.pdw-home-type-row {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.pdw-home-type-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.pdw-home-type-label span {
  min-width: 0;
}

.pdw-home-type-label strong {
  flex: 0 0 auto;
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.pdw-home-type-track {
  position: relative;
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-home-type-track i {
  display: block;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: inherit;
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop > .pdw-home-type-row {
  align-self: stretch;
}

@container pdw-widget (max-width: 700px) {
  .pdw-home-type-label,
  .pdw-home-type-label strong {
    font-size: 10px;
  }
}


/* HOME TYPE: Apple-inspired line graph */
.pdw-home-lollipop {
  display: grid;
  gap: 10px;
}

.pdw-home-type-row {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.pdw-home-type-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.pdw-home-type-label span {
  min-width: 0;
}

.pdw-home-type-label strong {
  flex: 0 0 auto;
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.pdw-home-type-track {
  position: relative;
  width: 100%;
  height: 6px;
  overflow: visible;
  background: color-mix(in srgb, var(--pdw-primary) 14%, white);
  border-radius: 999px;
}

.pdw-home-type-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  min-width: 0;
  height: 100%;
  background: var(--pdw-primary);
  border-radius: 999px;
}

.pdw-home-type-marker {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  background: var(--pdw-primary);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.pdw-view-frame.is-detail-view .pdw-home-lollipop > .pdw-home-type-row {
  align-self: stretch;
}

@container pdw-widget (max-width: 700px) {
  .pdw-home-type-label,
  .pdw-home-type-label strong {
    font-size: 10px;
  }

  .pdw-home-type-track {
    height: 5px;
  }

  .pdw-home-type-marker {
    width: 10px;
    height: 10px;
  }
}


/* YEAR MOVED IN / RECENT MOVERS: standardized labels and visible color dots */
.pdw-move-donut-legend {
  display: grid;
  align-content: center;
  gap: 9px;
  width: 100%;
}

.pdw-move-donut-legend > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  min-width: 0;
}

.pdw-move-donut-legend i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pdw-move-donut-legend span,
.pdw-move-donut-legend strong {
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  position: relative;
  top: 0.5px;   
}

.pdw-move-donut-legend span {
  min-width: 0;
}

.pdw-move-donut-legend strong {
  justify-self: end;
}

/* Match legend dots to the donut segment tones */
.pdw-move-donut-legend .tone-1 {
  background: color-mix(in srgb, var(--pdw-primary) 22%, white);
}

.pdw-move-donut-legend .tone-2 {
  background: color-mix(in srgb, var(--pdw-primary) 32%, white);
}

.pdw-move-donut-legend .tone-3 {
  background: color-mix(in srgb, var(--pdw-primary) 42%, white);
}

.pdw-move-donut-legend .tone-4 {
  background: color-mix(in srgb, var(--pdw-primary) 52%, white);
}

.pdw-move-donut-legend .tone-5 {
  background: color-mix(in srgb, var(--pdw-primary) 64%, white);
}

.pdw-move-donut-legend .tone-6 {
  background: var(--pdw-primary);
}

.pdw-move-donut-center strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.05;
}

.pdw-move-donut-center span {
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

@container pdw-widget (max-width: 700px) {
  .pdw-move-donut-legend {
    gap: 7px;
  }

  .pdw-move-donut-legend > div {
    grid-template-columns: 7px minmax(0, 1fr) auto;
    column-gap: 7px;
  }

  .pdw-move-donut-legend i {
    width: 7px;
    height: 7px;
  }

  .pdw-move-donut-legend span,
  .pdw-move-donut-legend strong,
  .pdw-move-donut-center span {
    font-size: 10px;
  }
}


/* YEAR MOVED IN: match the Employment donut exactly */
.pdw-view-frame.is-detail-view .pdw-employment-donut,
.pdw-view-frame.is-detail-view .pdw-move-donut {
  width: clamp(86px, 12cqi, 126px);
  height: clamp(86px, 12cqi, 126px);
  flex: 0 0 clamp(86px, 12cqi, 126px);
}

.pdw-view-frame.is-detail-view .pdw-employment-donut::after,
.pdw-view-frame.is-detail-view .pdw-move-donut::after {
  inset: 14px;
}


/* DEFAULT HOUSING + BACHELOR'S BOXES: use identical supporting-label typography */
.pdw-tenure-card .pdw-tenure-legend span,
.pdw-education-card .pdw-insight-copy p {
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

.pdw-tenure-card .pdw-tenure-legend strong {
  color: #657084 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}


/* Housing > Year Moved In: move legend labels slightly right */
.pdw-move-donut-legend{
    padding-left:10px;
}


/* Increase Employment + Year Moved In donuts by ~15px */
.pdw-view-frame.is-detail-view .pdw-employment-donut,
.pdw-view-frame.is-detail-view .pdw-move-donut{
    width: clamp(101px, 14cqi, 141px) !important;
    height: clamp(101px, 14cqi, 141px) !important;
    flex: 0 0 clamp(101px, 14cqi, 141px) !important;
}

.pdw-view-frame.is-detail-view .pdw-employment-donut::after,
.pdw-view-frame.is-detail-view .pdw-move-donut::after{
    inset:16px !important;
}


/* EDUCATION LEVEL ACHIEVED: center heading text with icon */
.pdw-education-attainment-heading {
  display: flex;
  align-items: center !important;
}

.pdw-education-attainment-heading h5 {
  display: flex;
  min-height: 38px;
  margin: 0 !important;
  align-items: center;
  line-height: 1.2;
}

/* EDUCATION LEVEL ACHIEVED: two-column graph with thicker light-to-dark bars */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 14px;
  align-content: center;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment > div {
  align-self: center;
  width: 100%;
}

.pdw-education-attainment-track {
  height: 10px !important;
  background: color-mix(in srgb, var(--pdw-primary) 10%, white);
}

.pdw-education-attainment > div:nth-child(1) .pdw-education-attainment-track i {
  background: color-mix(in srgb, var(--pdw-primary) 28%, white);
}

.pdw-education-attainment > div:nth-child(2) .pdw-education-attainment-track i {
  background: color-mix(in srgb, var(--pdw-primary) 40%, white);
}

.pdw-education-attainment > div:nth-child(3) .pdw-education-attainment-track i {
  background: color-mix(in srgb, var(--pdw-primary) 52%, white);
}

.pdw-education-attainment > div:nth-child(4) .pdw-education-attainment-track i {
  background: color-mix(in srgb, var(--pdw-primary) 64%, white);
}

.pdw-education-attainment > div:nth-child(5) .pdw-education-attainment-track i {
  background: color-mix(in srgb, var(--pdw-primary) 78%, white);
}

.pdw-education-attainment > div:nth-child(6) .pdw-education-attainment-track i {
  background: var(--pdw-primary);
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: 14px;
    row-gap: 10px;
  }

  .pdw-education-attainment-track {
    height: 8px !important;
  }

  .pdw-education-attainment-heading h5 {
    min-height: 30px;
  }
}


/* EDUCATION LEVEL ACHIEVED: tighter two-column layout */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
  column-gap: 12px !important;
  row-gap: 10px !important;
}

/* Use one continuous light-to-dark percentage scale on every bar */
.pdw-education-attainment-track {
  height: 12px !important;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pdw-primary) 9%, white) !important;
}

.pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(1) .pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(2) .pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(3) .pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(4) .pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(5) .pdw-education-attainment-track i,
.pdw-education-attainment > div:nth-child(6) .pdw-education-attainment-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pdw-primary) 22%, white) 0%,
    color-mix(in srgb, var(--pdw-primary) 58%, white) 50%,
    var(--pdw-primary) 100%
  ) !important;
  background-size: var(--pdw-education-gradient-width, 300px) 100% !important;
  background-position: left center !important;
  background-repeat: no-repeat !important;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: 10px !important;
    row-gap: 8px !important;
  }

  .pdw-education-attainment-track {
    height: 10px !important;
  }
}


/* EDUCATION LEVEL ACHIEVED: final spacing and rounded-bar correction */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, auto) !important;
  column-gap: 10px !important;
  row-gap: 7px !important;
  align-content: center !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-label {
  min-height: 15px;
  margin: 0 !important;
  align-items: center;
  line-height: 1.15;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track {
  position: relative;
  width: 100%;
  height: 12px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i {
  position: relative;
  display: block !important;
  min-width: 12px;
  max-width: 100%;
  height: 12px !important;
  overflow: hidden;
  border-radius: 999px !important;
  clip-path: inset(0 round 999px);
  -webkit-clip-path: inset(0 round 999px);
}

/* Guarantee a fully rounded leading and trailing cap */
.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::before,
.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::after {
  content: "";
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: inherit;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::before {
  left: 0;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::after {
  right: 0;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: 8px !important;
    row-gap: 6px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment > div {
    gap: 3px;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-track,
  .pdw-view-frame.is-detail-view .pdw-education-attainment-track > i {
    height: 10px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-track > i {
    min-width: 10px;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::before,
  .pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::after {
    width: 10px;
    height: 10px;
  }
}


/* EDUCATION LEVEL ACHIEVED: clean corrected graph */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, auto) !important;
  column-gap: 12px !important;
  row-gap: 8px !important;
  align-content: center !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment > div {
  display: block !important;
  min-width: 0;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-label {
  min-height: 0 !important;
  margin: 0 0 4px !important;
  line-height: 1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track {
  position: relative;
  width: 100%;
  height: 10px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--pdw-primary) 9%, white) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i,
.pdw-view-frame.is-detail-view .pdw-education-attainment > div:nth-child(n) .pdw-education-attainment-track > i {
  position: static !important;
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--pdw-primary) 24%, white) 0%,
      color-mix(in srgb, var(--pdw-primary) 58%, white) 52%,
      var(--pdw-primary) 100%
    ) !important;
  background-size: 100% 100% !important;
  background-position: left center !important;
  background-repeat: no-repeat !important;
}

/* Remove the artificial end circles that caused visible graph errors */
.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::before,
.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i::after {
  content: none !important;
  display: none !important;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: 10px !important;
    row-gap: 7px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-track {
    height: 9px !important;
  }
}


/* Slightly increase spacing between education graph items */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: 16px !important;
    row-gap: 12px !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-label {
    margin: 0 0 6px !important;
}


/* Responsive spacing for Education Level Achieved */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: clamp(10px, 2vw, 20px) !important;
    row-gap: clamp(10px, 2vw, 20px) !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment > div {
    padding-bottom: clamp(2px, 0.5vw, 6px);
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-label {
    margin-bottom: clamp(6px, 1vw, 10px) !important;
}


/* Fine tune Education spacing (-4px) */
.pdw-view-frame.is-detail-view .pdw-education-attainment {
    column-gap: clamp(6px, 1.4vw, 16px) !important;
    row-gap: clamp(6px, 1.4vw, 16px) !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-label {
    margin-bottom: clamp(4px, 0.8vw, 6px) !important;
}


/* LANGUAGES + DIVERSITY: match the updated graph labels and sizing */

/* Languages */
.pdw-view-frame.is-detail-view .pdw-language-bars {
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(6px, 1.4vw, 16px) !important;
}

.pdw-view-frame.is-detail-view .pdw-language-bars > div {
    width: 100%;
    align-self: center;
}

.pdw-view-frame.is-detail-view .pdw-language-label,
.pdw-view-frame.is-detail-view .pdw-language-label strong {
    color: #657084 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-language-label {
    margin: 0 0 clamp(4px, 0.8vw, 6px) !important;
    gap: 10px;
}

.pdw-view-frame.is-detail-view .pdw-language-track {
    position: relative;
    width: 100%;
    height: 10px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--pdw-primary) 9%, white) !important;
}

.pdw-view-frame.is-detail-view .pdw-language-track > i {
    display: block !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    border-radius: 999px !important;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--pdw-primary) 24%, white) 0%,
        color-mix(in srgb, var(--pdw-primary) 58%, white) 52%,
        var(--pdw-primary) 100%
    ) !important;
}

/* Diversity */
.pdw-view-frame.is-detail-view .pdw-ethnicity-stack {
    height: 10px !important;
    border-radius: 999px !important;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-stack > span:first-child {
    border-radius: 999px 0 0 999px;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-stack > span:last-child {
    border-radius: 0 999px 999px 0;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(6px, 1.2vw, 10px) clamp(10px, 1.8vw, 16px) !important;
    margin-top: clamp(10px, 1.5vw, 14px) !important;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-item {
    grid-template-columns: 9px minmax(0, 1fr) auto;
    gap: 7px;
    color: #657084 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-item strong,
.pdw-view-frame.is-detail-view .pdw-ethnicity-item span {
    color: #657084 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-item i {
    width: 9px !important;
    height: 9px !important;
    border-radius: 50% !important;
}

@container pdw-widget (max-width: 700px) {
    .pdw-view-frame.is-detail-view .pdw-language-track,
    .pdw-view-frame.is-detail-view .pdw-ethnicity-stack {
        height: 9px !important;
    }

    .pdw-view-frame.is-detail-view .pdw-language-label,
    .pdw-view-frame.is-detail-view .pdw-language-label strong,
    .pdw-view-frame.is-detail-view .pdw-ethnicity-item,
    .pdw-view-frame.is-detail-view .pdw-ethnicity-item strong,
    .pdw-view-frame.is-detail-view .pdw-ethnicity-item span {
        font-size: 10px !important;
    }
}


/* ===== LANGUAGES: equal spacing ===== */

.pdw-view-frame.is-detail-view .pdw-language-bars{
    display:grid !important;
    grid-template-rows:repeat(3,1fr) !important;
    align-content:stretch !important;
    row-gap:clamp(8px,1vw,12px) !important;
}

.pdw-view-frame.is-detail-view .pdw-language-bars > div{
    display:flex !important;
    flex-direction:column;
    justify-content:center;
    min-height:0;
}

.pdw-view-frame.is-detail-view .pdw-language-label{
    margin-bottom:6px !important;
}

/* ===== ETHNICITY: thicker stacked bar ===== */

.pdw-view-frame.is-detail-view .pdw-ethnicity-stack{
    height:20px !important;
    border-radius:999px !important;
    overflow:hidden !important;
}

.pdw-view-frame.is-detail-view .pdw-ethnicity-stack > span{
    height:20px !important;
    display:block;
}

@container pdw-widget (max-width:700px){

    .pdw-view-frame.is-detail-view .pdw-language-bars{
        row-gap:8px !important;
    }

    .pdw-view-frame.is-detail-view .pdw-ethnicity-stack,
    .pdw-view-frame.is-detail-view .pdw-ethnicity-stack > span{
        height:16px !important;
    }
}


/* Fix Languages spacing */
.pdw-view-frame.is-detail-view .pdw-language-bars{
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    gap:10px !important;
    height:auto !important;
}
.pdw-view-frame.is-detail-view .pdw-language-bars > div{
    flex:0 0 auto !important;
}


/* Languages Spoken - use solid primary blue */
.pdw-view-frame.is-detail-view .pdw-language-track > i{
    background: var(--pdw-primary) !important;
}


/* ===== Commute Methods - match updated typography ===== */

.pdw-view-frame.is-detail-view .pdw-commute-method-label,
.pdw-view-frame.is-detail-view .pdw-commute-method-label strong,
.pdw-view-frame.is-detail-view .pdw-commute-method-name,
.pdw-view-frame.is-detail-view .pdw-commute-method-value{
    font-size:11px !important;
    font-weight:600 !important;
    color:#657084 !important;
    line-height:1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-method-label{
    margin-bottom:6px !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-method-track{
    height:10px !important;
    border-radius:999px !important;
    overflow:hidden !important;
    background:color-mix(in srgb, var(--pdw-primary) 9%, white) !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-method-track > i{
    height:100% !important;
    border-radius:999px !important;
    background:var(--pdw-primary) !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-methods{
    gap:10px !important;
}

@container pdw-widget (max-width:700px){
  .pdw-view-frame.is-detail-view .pdw-commute-method-label,
  .pdw-view-frame.is-detail-view .pdw-commute-method-name,
  .pdw-view-frame.is-detail-view .pdw-commute-method-value{
      font-size:10px !important;
  }
}


/* Commute Methods - match typography used elsewhere */
.pdw-view-frame.is-detail-view .pdw-commute-method-name,
.pdw-view-frame.is-detail-view .pdw-commute-method-value,
.pdw-view-frame.is-detail-view .pdw-commute-methods strong,
.pdw-view-frame.is-detail-view .pdw-commute-methods span{
    font-size:11px !important;
    font-weight:600 !important;
    color:#657084 !important;
    line-height:1.2 !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-method-name{
    margin-bottom:6px !important;
}


/* Force commute labels/value color to match all other charts */
.pdw-view-frame.is-detail-view .pdw-commute-methods *,
.pdw-view-frame.is-detail-view .pdw-commute-methods .label,
.pdw-view-frame.is-detail-view .pdw-commute-methods .name,
.pdw-view-frame.is-detail-view .pdw-commute-methods .value,
.pdw-view-frame.is-detail-view .pdw-commute-methods b,
.pdw-view-frame.is-detail-view .pdw-commute-methods strong{
    color:#657084 !important;
    font-size:11px !important;
    font-weight:600 !important;
}

/* Percentage values */
.pdw-view-frame.is-detail-view .pdw-commute-methods [class*="percent"],
.pdw-view-frame.is-detail-view .pdw-commute-methods [class*="value"]{
    color:#657084 !important;
}



/* ===== Commute typography (correct selectors) ===== */
.pdw-view-frame.is-detail-view .pdw-commute-label-wrap,
.pdw-view-frame.is-detail-view .pdw-commute-label-wrap span,
.pdw-view-frame.is-detail-view .pdw-commute-label-wrap strong,
.pdw-view-frame.is-detail-view .pdw-commute-percent{
    color:#657084 !important;
    font-size:11px !important;
    font-weight:600 !important;
    line-height:1.25 !important;
}

.pdw-view-frame.is-detail-view .pdw-commute-percent{
    text-align:right;
}

@container pdw-widget (max-width:700px){
  .pdw-view-frame.is-detail-view .pdw-commute-label-wrap,
  .pdw-view-frame.is-detail-view .pdw-commute-label-wrap span,
  .pdw-view-frame.is-detail-view .pdw-commute-percent{
      font-size:10px !important;
  }
}

/* =========================================================
   MOBILE SUMMARY LAYOUT — 700px AND UNDER
   ========================================================= */
@container pdw-widget (max-width: 700px) {

  /* Category navigation */
  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin-right: 20px !important;
    margin-left: 20px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    position: relative !important;
    width: auto !important;
    padding: 0 28px !important;
    overflow: visible !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    gap: 4px !important;
    align-items: stretch !important;
    justify-content: safe center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories::-webkit-scrollbar {
    display: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 0 0 84px !important;
    width: 84px !important;
    min-width: 84px !important;
    min-height: 60px !important;
    padding: 8px 4px 10px !important;
    gap: 5px !important;
    justify-self: auto !important;
    scroll-snap-align: start !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category > span:last-child {
    font-size: 11px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-icon {
    width: 21px !important;
    height: 21px !important;
    flex-basis: 21px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  /* Category arrows */
  .pdw-view-frame.is-summary-view .pdw-category-nav {
    position: absolute !important;
    z-index: 4 !important;
    top: 50% !important;
    display: inline-flex !important;
    width: 24px !important;
    height: 34px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pdw-primary) !important;
    background: transparent !important;
    border: 0 !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-prev {
    left: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next {
    right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-nav span {
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-nav:disabled {
    display: none !important;
  }

  /* Five summary boxes */
  .pdw-stats-carousel {
    position: relative !important;
    width: auto !important;
    margin: 0 20px !important;
    padding: 16px 28px 8px !important;
  }

  .pdw-stats {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: safe center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .pdw-stats::-webkit-scrollbar {
    display: none !important;
  }

  .pdw-stat-card {
    flex: 0 0 108px !important;
    width: 108px !important;
    min-width: 108px !important;
    min-height: 100px !important;
    padding: 11px 8px 10px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    scroll-snap-align: start !important;
  }

  .pdw-stat-row {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .pdw-stat-icon {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
    border-radius: 9px !important;
  }

  .pdw-stat-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .pdw-stat-value {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .pdw-stat-label {
    width: 100% !important;
    margin-top: 5px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Summary-card arrows */
  .pdw-stats-nav {
    position: absolute !important;
    z-index: 4 !important;
    top: 50% !important;
    display: inline-flex !important;
    width: 24px !important;
    height: 38px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pdw-primary) !important;
    background: transparent !important;
    border: 0 !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
  }

  .pdw-stats-prev {
    left: 0 !important;
  }

  .pdw-stats-next {
    right: 0 !important;
  }

  .pdw-stats-nav span {
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  .pdw-stats-nav:disabled {
    display: none !important;
  }

  /* Compact mobile map */
  .pdw-map-wrap {
    height: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
  }
}

/* =========================================================
   MOBILE EDGE-TO-EDGE CAROUSELS + OVERLAY ARROWS
   ========================================================= */
@container pdw-widget (max-width: 700px) {

  /* Extend category area to the same edges used on desktop */
  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    width: 100% !important;
    padding: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Extend five data boxes to the full available width */
  .pdw-stats-carousel {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-stats {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Overlay carousel arrows */
  .pdw-view-frame.is-summary-view .pdw-category-nav,
  .pdw-stats-nav {
    z-index: 10 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    color: var(--pdw-primary) !important;
    background: rgba(255, 255, 255, .76) !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .14) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-prev,
  .pdw-stats-prev {
    left: 8px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next,
  .pdw-stats-next {
    right: 8px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-nav span,
  .pdw-stats-nav span {
    font-size: 23px !important;
    line-height: 1 !important;
    transform: translateY(-1px) !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-nav:hover,
  .pdw-stats-nav:hover {
    background: rgba(255, 255, 255, .9) !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-nav:active,
  .pdw-stats-nav:active {
    transform: translateY(-50%) scale(.94) !important;
  }

  /* Keep unavailable arrows completely hidden */
  .pdw-view-frame.is-summary-view .pdw-category-nav:disabled,
  .pdw-stats-nav:disabled {
    display: none !important;
  }
}

/* =========================================================
   MOBILE ALIGNMENT — CATEGORIES MATCH SUMMARY CARDS
   ========================================================= */
@container pdw-widget (max-width: 700px) {

  /* Use the same left/right edge for both carousel rows */
  .pdw-view-frame.is-summary-view .pdw-category-carousel,
  .pdw-stats-carousel {
    box-sizing: border-box !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories,
  .pdw-stats {
    box-sizing: border-box !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Keep circular arrows over the content instead of reserving space */
  .pdw-view-frame.is-summary-view .pdw-category-prev,
  .pdw-stats-prev {
    left: 24px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next,
  .pdw-stats-next {
    right: 24px !important;
  }
}



/* Fine tune mobile alignment */
@container pdw-widget (max-width:700px){

  /* Stretch the category strip closer to the container edges */
  .pdw-view-frame.is-summary-view .pdw-category-carousel{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  /* Keep arrows just inside the edge */
  .pdw-view-frame.is-summary-view .pdw-category-prev{
    left:10px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next{
    right:10px !important;
  }
}

/* =========================================================
   MOBILE CATEGORY WIDTH — SPREAD ACROSS FULL CONTENT AREA
   ========================================================= */
@container pdw-widget (max-width: 700px) {

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    justify-content: flex-start !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 1 0 84px !important;
    width: auto !important;
    min-width: 84px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-prev {
    left: 4px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next {
    right: 4px !important;
  }
}

/* =========================================================
   SMALL MOBILE — 560px AND UNDER
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  /* Reduce horizontal padding to roughly half the desktop spacing */
  .pdw-header {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel,
  .pdw-stats-carousel,
  .pdw-default-insights,
  .pdw-tab-panel,
  .pdw-powered {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Keep all summary rows aligned inside the widget */
  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories,
  .pdw-stats {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    box-sizing: border-box !important;
  }

  /* Hide every possible disabled state for the left category arrow */
  .pdw-view-frame.is-summary-view .pdw-category-prev:disabled,
  .pdw-view-frame.is-summary-view .pdw-category-prev[disabled],
  .pdw-view-frame.is-summary-view .pdw-category-prev[aria-disabled="true"],
  .pdw-view-frame.is-summary-view .pdw-category-prev.is-disabled {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Overlay active arrows without pushing content outside */
  .pdw-view-frame.is-summary-view .pdw-category-prev,
  .pdw-stats-prev {
    left: 20px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next,
  .pdw-stats-next {
    right: 20px !important;
  }

  /* Slightly narrower carousel items for this width */
  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 0 0 78px !important;
    width: 78px !important;
    min-width: 78px !important;
  }

  .pdw-stat-card {
    flex-basis: 102px !important;
    width: 102px !important;
    min-width: 102px !important;
  }

  /* Alternative small-screen design for Owner vs Renter
     and Bachelor's Degree summary boxes */
  .pdw-default-insights {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-top: 8px !important;
  }

  .pdw-insight-card {
    min-height: 112px !important;
    padding: 14px 16px !important;
    gap: 14px !important;
    border-radius: 15px !important;
  }

  .pdw-insight-card h3 {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  .pdw-insight-card p {
    margin-top: 5px !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .pdw-insight-kicker {
    margin-bottom: 4px !important;
    font-size: 9px !important;
  }

  .pdw-donut,
  .pdw-progress-ring {
    width: 70px !important;
    height: 70px !important;
    flex-basis: 70px !important;
  }

  .pdw-donut::after,
  .pdw-progress-ring::after {
    inset: 9px !important;
  }

  .pdw-donut-center strong,
  .pdw-progress-center strong {
    font-size: 13px !important;
  }

  .pdw-tenure-legend {
    gap: 5px 10px !important;
    margin-top: 8px !important;
  }

  .pdw-tenure-legend span {
    font-size: 9px !important;
  }

  /* Detail-view owner/renter card */
  .pdw-tenure-top-card {
    padding: 14px !important;
  }

  .pdw-tenure-top-heading {
    display: none !important;
  }

  .pdw-tenure-top-labels {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .pdw-tenure-top-labels > * {
    display: flex !important;
    min-width: 0 !important;
    padding: 8px 6px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: #fff !important;
    border: 1px solid var(--pdw-border) !important;
    border-radius: 10px !important;
  }

  /* Education rows: allow long labels such as Bachelor's Degree
     to use their own line above the bar */
  .pdw-view-frame.is-detail-view .pdw-education-attainment > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    min-width: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-label {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    align-items: end !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-label span {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.25 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-label strong {
    white-space: nowrap !important;
  }

  .pdw-view-frame.is-detail-view .pdw-education-attainment-track {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* =========================================================
   SMALL MOBILE REFINEMENTS — 560px AND UNDER
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  /* Categories fill the full content width with even spacing */
  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    display: flex !important;
    width: 100% !important;
    gap: 0 !important;
    justify-content: space-between !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 0 0 calc((100% - 8px) / 4) !important;
    width: calc((100% - 8px) / 4) !important;
    min-width: calc((100% - 8px) / 4) !important;
    max-width: calc((100% - 8px) / 4) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  /* Slightly tighter grey summary boxes */
  .pdw-default-insights {
    gap: 8px !important;
  }

  .pdw-insight-card {
    min-height: 100px !important;
    padding: 11px 12px !important;
    gap: 10px !important;
  }

  .pdw-insight-card h3 {
    margin-bottom: 2px !important;
  }

  .pdw-insight-card p {
    margin-top: 3px !important;
  }

  .pdw-tenure-legend {
    margin-top: 5px !important;
  }

  /* Map spans the full inner width */
  .pdw-map-section,
  .pdw-map-container,
  .pdw-map-wrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .pdw-map-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-map-wrap {
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
  }
}

/* =========================================================
   SMALL MOBILE WIDTH / SPACING FIX — 560px AND UNDER
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  /* Fit more categories across with controlled 30px spacing */
  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    box-sizing: border-box !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    box-sizing: border-box !important;
    width: 100% !important;
    gap: 30px !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 0 0 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Map: override the original 32px card margins */
  .pdw-map-card {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .pdw-map-wrap,
  .pdw-map {
    width: 100% !important;
    max-width: none !important;
  }
}

/* =========================================================
   480PX MOBILE REFINEMENTS
   ========================================================= */
@container pdw-widget (max-width: 480px) {

  /* Smaller heading and subtitle */
  .pdw-header {
    padding: 20px 14px 10px !important;
  }

  .pdw-header h2 {
    max-width: 245px !important;
    font-size: 32px !important;
    line-height: 0.98 !important;
    letter-spacing: -0.04em !important;
  }

  .pdw-description {
    max-width: 350px !important;
    margin-top: 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  /* Show only three highlights */
  .pdw-community-highlights {
    gap: 7px 15px !important;
    margin-top: 12px !important;
  }

  .pdw-highlight-item {
    font-size: 11px !important;
  }

  .pdw-highlight-item:nth-child(n + 4) {
    display: none !important;
  }

  /* Prevent the first category label from clipping */
  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    position: relative !important;
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    overflow: visible !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 26px !important;
    padding: 0 4px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories::-webkit-scrollbar {
    display: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 0 0 54px !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category > span:last-child {
    width: 62px !important;
    margin-left: -4px !important;
    font-size: 10.5px !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Keep active carousel arrows visible over the row */
  .pdw-view-frame.is-summary-view .pdw-category-nav {
    top: 50% !important;
    z-index: 20 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-prev {
    left: 5px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next {
    right: 5px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-next:not(:disabled),
  .pdw-view-frame.is-summary-view .pdw-category-next:not([disabled]) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Disabled left arrow remains hidden */
  .pdw-view-frame.is-summary-view .pdw-category-prev:disabled,
  .pdw-view-frame.is-summary-view .pdw-category-prev[disabled],
  .pdw-view-frame.is-summary-view .pdw-category-prev[aria-disabled="true"],
  .pdw-view-frame.is-summary-view .pdw-category-prev.is-disabled {
    display: none !important;
  }
}

/* =========================================================
   480PX HEADER + CATEGORY ARROW FIX
   ========================================================= */
@container pdw-widget (max-width: 480px) {

  /* Keep "Who Lives Here?" on one line */
  .pdw-header h2 {
    max-width: none !important;
    width: auto !important;
    font-size: 26px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.035em !important;
    white-space: nowrap !important;
  }

  /* Never show the left category arrow unless it is usable */
  .pdw-view-frame.is-summary-view .pdw-category-prev:disabled,
  .pdw-view-frame.is-summary-view .pdw-category-prev[disabled],
  .pdw-view-frame.is-summary-view .pdw-category-prev[aria-disabled="true"],
  .pdw-view-frame.is-summary-view .pdw-category-prev.is-disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-prev:not(:disabled):not([disabled]):not([aria-disabled="true"]):not(.is-disabled) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* =========================================================
   480PX CATEGORY ROW — FIT ALL ITEMS, NO ARROWS
   ========================================================= */
@container pdw-widget (max-width: 480px) {

  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel .pdw-categories {
    display: flex !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 0 !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    scroll-snap-type: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category:first-child,
  .pdw-view-frame.is-summary-view .pdw-category:last-child,
  .pdw-view-frame.is-summary-view .pdw-category:not(:first-child):not(:last-child) {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category > span:last-child {
    width: 100% !important;
    margin-left: 0 !important;
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-icon {
    width: 19px !important;
    height: 19px !important;
    flex-basis: 19px !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* No category navigation arrows at this width */
  .pdw-view-frame.is-summary-view .pdw-category-nav,
  .pdw-view-frame.is-summary-view .pdw-category-prev,
  .pdw-view-frame.is-summary-view .pdw-category-next {
    display: none !important;
  }
}



/* =========================================================
   560px - Income donut mobile layout
   ========================================================= */
@container pdw-widget (max-width:560px){

  /* Stack donut over labels in the income insight card */
  .pdw-insight-card--income,
  .pdw-income-card,
  .pdw-income-summary{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
  }

  .pdw-insight-card--income .pdw-donut,
  .pdw-income-card .pdw-donut,
  .pdw-income-summary .pdw-donut{
    margin:0 auto 12px !important;
    flex-shrink:0 !important;
  }

  .pdw-insight-card--income .pdw-income-legend,
  .pdw-insight-card--income .pdw-legend,
  .pdw-income-card .pdw-income-legend,
  .pdw-income-summary .pdw-income-legend{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    margin-top:4px !important;
    text-align:center !important;
  }

  .pdw-insight-card--income .pdw-income-legend > *,
  .pdw-insight-card--income .pdw-legend > *{
    justify-content:center !important;
  }
}

/* =========================================================
   560px - Year Moved In donut mobile layout
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  .pdw-move-donut-layout {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
  }

  .pdw-move-donut {
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  .pdw-move-donut-legend {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    gap: 7px !important;
  }

  .pdw-move-donut-legend > div {
    width: 100% !important;
    grid-template-columns: 8px minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    text-align: left !important;
  }
}



/* =========================================================
   560px - Employment + Ethnicity mobile refinements
   ========================================================= */
@container pdw-widget (max-width:560px){

  /* Employment donut: stack legend below donut */
  .pdw-employment-layout,
  .pdw-employment-summary,
  .pdw-employment-card{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:12px !important;
  }

  .pdw-employment-donut,
  .pdw-employment-layout .pdw-donut{
    margin:0 auto !important;
    flex-shrink:0 !important;
  }

  .pdw-employment-legend,
  .pdw-employment-layout .pdw-legend{
    width:100% !important;
    max-width:280px !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
    margin-top:4px !important;
  }

  /* Ethnicity: single-column labels */
  .pdw-ethnicity-grid,
  .pdw-ethnicity-breakdown,
  .pdw-ethnicity-list{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .pdw-ethnicity-grid > *,
  .pdw-ethnicity-breakdown > *,
  .pdw-ethnicity-list > *{
    width:100% !important;
  }
}

/* =========================================================
   560px - Exact Employment + Ethnicity fixes
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  /* Employment: donut left, legend and percentages right */
  .pdw-view-frame.is-detail-view .pdw-employment-donut-layout {
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 94px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-employment-donut {
    width: 94px !important;
    height: 94px !important;
    margin: 0 !important;
    flex: none !important;
  }

  .pdw-view-frame.is-detail-view .pdw-employment-legend {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 7px !important;
    margin: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-employment-legend-item {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 9px minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  /* Ethnicity Breakdown: one label per row */
  .pdw-view-frame.is-detail-view .pdw-ethnicity-legend {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-ethnicity-item {
    width: 100% !important;
    grid-template-columns: 9px minmax(0, 1fr) auto !important;
  }
}

/* =========================================================
   560px - Population Overview cards match default summary cards
   ========================================================= */
@container pdw-widget (max-width: 560px) {

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat {
    min-height: 104px !important;
    padding: 12px 8px 10px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat-row {
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat-icon {
    width: 29px !important;
    height: 29px !important;
    flex: 0 0 29px !important;
    border-radius: 9px !important;
  }

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat strong {
    width: 100% !important;
    margin-top: 1px !important;
    overflow: hidden !important;
    font-size: 16px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .pdw-view-frame.is-detail-view
  .pdw-population-panel
  .pdw-mini-stat small {
    width: 100% !important;
    margin-top: 7px !important;
    padding: 0 !important;
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }
}



/* =========================================================
   480px - Housing summary cards match default summary cards
   ========================================================= */
@container pdw-widget (max-width:480px){

  .pdw-households-top-summary{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .pdw-households-top-summary .pdw-mini-stat{
    min-height:104px !important;
    padding:12px 8px 10px !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
  }

  .pdw-households-top-summary .pdw-mini-stat-row{
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
  }

  .pdw-households-top-summary .pdw-mini-stat-icon{
    width:29px !important;
    height:29px !important;
    flex:0 0 29px !important;
    border-radius:9px !important;
  }

  .pdw-households-top-summary .pdw-mini-stat-icon svg{
    width:16px !important;
    height:16px !important;
  }

  .pdw-households-top-summary .pdw-mini-stat strong{
    display:block !important;
    width:100% !important;
    margin-top:1px !important;
    font-size:16px !important;
    line-height:1.05 !important;
    text-align:center !important;
  }

  .pdw-households-top-summary .pdw-mini-stat small{
    display:block !important;
    width:100% !important;
    margin-top:7px !important;
    font-size:9.5px !important;
    line-height:1.15 !important;
    text-align:center !important;
  }

}


/* =========================================================
   560px - Detail view right-edge alignment fix
   ========================================================= */
@container pdw-widget (max-width:560px){

  /*
   * The detail panel is scaled to preserve the widget height.
   * Its earlier width:100% !important rule prevented the JS
   * compensation width from taking effect, leaving excess
   * blank space on the right.
   */
  .pdw-view-frame.is-detail-view .pdw-tab-panel{
    box-sizing:border-box !important;
    width:calc(100% / var(--pdw-detail-scale, 1)) !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

}


/* =========================================================
   480px - Match detail-to-map spacing with default view
   ========================================================= */
@container pdw-widget (max-width:480px){

  /* Keep the same breathing room above the map after any category is opened */
  .pdw-view-frame.is-detail-view + .pdw-map-card{
    margin-top:22px !important;
  }

}


/* =========================================================
   480px - Fixed view position and uniform map spacing
   ========================================================= */
@container pdw-widget (max-width:480px){

  /*
   * Use the view frame itself for spacing so summary and every
   * opened category place the map at exactly the same position.
   */
  .pdw-view-frame,
  .pdw-view-frame.is-summary-view,
  .pdw-view-frame.is-detail-view{
    margin-bottom:22px !important;
  }

  .pdw-view-frame + .pdw-map-card,
  .pdw-view-frame.is-detail-view + .pdw-map-card{
    margin-top:0 !important;
  }
}


/* =========================================================
   480px - Lock every category height and tighten map spacing
   ========================================================= */
@container pdw-widget (max-width:480px){

  /* One fixed spacing rule for summary and every category. */
  .pdw-view-frame,
  .pdw-view-frame.is-summary-view,
  .pdw-view-frame.is-detail-view{
    margin-bottom:0 !important;
  }

  /*
   * Pull the map 30px closer than the previous 22px gap.
   * This applies identically to the default view and all tabs.
   */
  .pdw-view-frame + .pdw-map-card,
  .pdw-view-frame.is-summary-view + .pdw-map-card,
  .pdw-view-frame.is-detail-view + .pdw-map-card{
    margin-top:-8px !important;
  }

  /* Make the opened panel occupy the complete fixed view frame. */
  .pdw-view-frame.is-detail-view .pdw-tab-panel{
    display:flex !important;
    height:100% !important;
    min-height:100% !important;
    flex-direction:column !important;
    padding-bottom:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-panel-toolbar{
    flex:0 0 auto !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel > :not(.pdw-panel-toolbar){
    min-height:0 !important;
    flex:1 1 auto !important;
  }

  /*
   * Mobile stacking rules elsewhere were reverting these three
   * shorter categories to auto height. Force them to fill the
   * same available height as Education, Diversity and Commute.
   */
  .pdw-view-frame.is-detail-view .pdw-population-panel,
  .pdw-view-frame.is-detail-view .pdw-economy-panel,
  .pdw-view-frame.is-detail-view .pdw-households-layout{
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel{
    align-items:stretch !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-panel-card{
    height:100% !important;
    min-height:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-economy-panel{
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
  }

  .pdw-view-frame.is-detail-view .pdw-economy-visuals{
    height:100% !important;
    min-height:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-panel-card{
    height:100% !important;
    min-height:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-households-layout{
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
  }

  .pdw-view-frame.is-detail-view .pdw-households-bottom-row{
    height:100% !important;
    min-height:0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-households-bottom-row > .pdw-panel-card{
    height:100% !important;
    min-height:0 !important;
  }
}


/* =========================================================
   Global bottom spacing before map
   ========================================================= */
.pdw-view-frame,
.pdw-view-frame.is-summary-view,
.pdw-view-frame.is-detail-view{
  margin-bottom:10px !important;
}

.pdw-view-frame + .pdw-map-card{
  margin-top:0 !important;
}


/* =========================================================
   360px - Move radius badge below the title
   ========================================================= */
@container pdw-widget (max-width:360px){

  .pdw-header-row{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:7px !important;
  }

  .pdw-header-row h2{
    width:100% !important;
    margin:0 !important;
  }

  .pdw-header-radius{
    position:static !important;
    align-self:flex-start !important;
    margin:0 !important;
    white-space:nowrap !important;
  }

}


/* =========================================================
   Mobile map attribution - full-width expanded background
   ========================================================= */
@container (max-width:640px){

  .pdw-map .leaflet-control-attribution.is-expanded{
    border-radius:8px 0 0 0 !important;
    background:rgba(255,255,255,.96) !important;
    box-shadow:0 4px 14px rgba(21,32,51,.10) !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content{
    right:0 !important;
    width:100% !important;
    padding-right:36px !important;
    border-radius:8px 0 0 0 !important;
    background:rgba(255,255,255,.96) !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-toggle{
    background:transparent !important;
    box-shadow:none !important;
  }

}


/* =========================================================
   Proximitii blue hover for Leaflet zoom controls
   ========================================================= */


/* =========================================================
   Zoom buttons - subtle Proximitii hover
   ========================================================= */
.pdw-map .leaflet-control-zoom a{
    transition:all .18s ease;
}

.pdw-map .leaflet-control-zoom a:hover,
.pdw-map .leaflet-control-zoom a:focus-visible{
    background:#F3F4F6 !important;
    color:#4B5563 !important;
    border-color:#E5E7EB !important;
}


/* Refined map radius badge */
.pdw-map-context{
    position:absolute;
    top:0!important;
    left:0!important;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    padding:5px 10px!important;
    background:rgba(255,255,255,.88);
    border:0;
    border-radius:0 0 14px 0;
    box-shadow:0 4px 14px rgba(21,32,51,.08);
    z-index:500;
}
.pdw-map-context strong{display:none!important;}
.pdw-map-context span{
    color:var(--pdw-primary)!important;
    font-size:11px!important;
    font-weight:700!important;
    line-height:1.1;
}



/* FINAL APPLE-STYLE MOBILE CATEGORY SELECTOR */
@container (max-width: 560px) {
  .pdw-view-frame.is-summary-view .pdw-more-box,
  .pdw-view-frame.is-summary-view .pdw-category-carousel {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-more-box {
    margin: 14px 20px 7px !important;
  }

  /* Hide the original category strip and all carousel controls. */
  .pdw-view-frame.is-summary-view .pdw-categories,
  .pdw-view-frame.is-summary-view .pdw-category,
  .pdw-view-frame.is-summary-view .pdw-category-nav,
  .pdw-view-frame.is-summary-view .pdw-category-prev,
  .pdw-view-frame.is-summary-view .pdw-category-next {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select-label {
    display: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select-control {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 52px 0 18px !important;
    box-sizing: border-box !important;

    color: #344054 !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,251,253,.98)) !important;
    border: 2px solid #edf0f4 !important;
    border-radius: 18px !important;
    box-shadow:
      0 1px 2px rgba(16,24,40,.03),
      0 8px 24px rgba(16,24,40,.07) !important;

    font-family: var(--pdw-font, "Poppins", sans-serif) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    outline: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select:hover {
    border-color: #e6eaf0 !important;
    box-shadow:
      0 1px 2px rgba(16,24,40,.03),
      0 10px 28px rgba(16,24,40,.08) !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select:focus,
  .pdw-view-frame.is-summary-view .pdw-category-select:focus-visible {
    border-color: color-mix(in srgb, var(--pdw-primary) 32%, #edf0f4) !important;
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--pdw-primary) 10%, transparent),
      0 8px 24px rgba(16,24,40,.07) !important;
    outline: none !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select-arrow {
    position: absolute !important;
    top: 50% !important;
    right: 20px !important;
    display: block !important;
    width: 9px !important;
    height: 9px !important;
    pointer-events: none !important;
    border-right: 2px solid #98a2b3 !important;
    border-bottom: 2px solid #98a2b3 !important;
    transform: translateY(-68%) rotate(45deg) !important;
  }

  .pdw-view-frame.is-summary-view .pdw-stats-carousel {
    padding-top: 11px !important;
  }
}



/* FULL-WIDTH MOBILE DROPDOWN */
@container (max-width: 560px) {
  .pdw-view-frame.is-summary-view .pdw-more-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px 0 7px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-carousel,
  .pdw-view-frame.is-summary-view .pdw-category-select-wrap,
  .pdw-view-frame.is-summary-view .pdw-category-select-control,
  .pdw-view-frame.is-summary-view .pdw-category-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select:hover {
    border-color: #edf0f4 !important;
    box-shadow:
      0 1px 2px rgba(16,24,40,.03),
      0 8px 24px rgba(16,24,40,.07) !important;
  }
}


/* 561–700px: keep opened category panels the same width as the default view */
@container pdw-widget (min-width: 561px) and (max-width: 700px) {
  .pdw-view-frame.is-detail-view {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel > :not(.pdw-panel-toolbar),
  .pdw-view-frame.is-detail-view .pdw-split-panel,
  .pdw-view-frame.is-detail-view .pdw-economy-panel,
  .pdw-view-frame.is-detail-view .pdw-households-layout,
  .pdw-view-frame.is-detail-view .pdw-languages-layout,
  .pdw-view-frame.is-detail-view .pdw-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}


/* =========================================================
   FINAL MOBILE DROPDOWN + DETAIL PANEL ALIGNMENT
   ========================================================= */

/*
 * The dropdown section has BOTH pdw-more-box and
 * pdw-category-carousel on the same element. Subtract the
 * two 20px gutters from its width so margins do not overflow.
 */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-summary-view .pdw-more-box.pdw-category-carousel {
    display: block !important;
    width: calc(100% - 40px) !important;
    max-width: calc(100% - 40px) !important;
    margin: 14px 20px 7px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .pdw-view-frame.is-summary-view .pdw-category-select-wrap,
  .pdw-view-frame.is-summary-view .pdw-category-select-control,
  .pdw-view-frame.is-summary-view .pdw-category-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Keep opened mobile category content inside 20px gutters. */
  .pdw-view-frame.is-detail-view {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    transform: scaleY(var(--pdw-detail-scale, 1)) !important;
    transform-origin: top left !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel > :not(.pdw-panel-toolbar),
  .pdw-view-frame.is-detail-view .pdw-split-panel,
  .pdw-view-frame.is-detail-view .pdw-economy-panel,
  .pdw-view-frame.is-detail-view .pdw-households-layout,
  .pdw-view-frame.is-detail-view .pdw-languages-layout,
  .pdw-view-frame.is-detail-view .pdw-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Keep opened tablet category content aligned to 24px gutters. */
@container pdw-widget (min-width: 561px) and (max-width: 700px) {
  .pdw-view-frame.is-detail-view {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
    transform: scaleY(var(--pdw-detail-scale, 1)) !important;
    transform-origin: top left !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel > :not(.pdw-panel-toolbar),
  .pdw-view-frame.is-detail-view .pdw-split-panel,
  .pdw-view-frame.is-detail-view .pdw-economy-panel,
  .pdw-view-frame.is-detail-view .pdw-households-layout,
  .pdw-view-frame.is-detail-view .pdw-languages-layout,
  .pdw-view-frame.is-detail-view .pdw-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}


/* Desktop (900px+) - larger default summary donuts */
@container pdw-widget (min-width: 900px) {
  .pdw-donut,
  .pdw-progress-ring {
    width: 100px;
    height: 100px;
    flex: 0 0 100px;
  }
  .pdw-donut::after,
  .pdw-progress-ring::after { inset:13px; }
  .pdw-donut-center strong,
  .pdw-progress-center strong { font-size:18px; }
  .pdw-donut-center span,
  .pdw-progress-center span { font-size:9px; }
}



/* ==========================
   SMALL MOBILE (560px and under)
   ========================== */
@container pdw-widget (max-width: 560px) {
  .pdw-description {
    font-size: 12px;
    line-height: 1.3;
    margin-top: 5px;
  }
}

/* =========================================================
   PEOPLE MOBILE — overview carousel above Age Breakdown
   560px and below only
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  /* Stack Population Overview above Age Breakdown. */
  .pdw-view-frame.is-detail-view .pdw-population-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 10px !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
  }

  /* Population Overview uses the same one-row carousel pattern as summary cards. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card {
    position: relative !important;
    display: flex !important;
    min-height: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-two {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 28px 3px !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-two::-webkit-scrollbar {
    display: none !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-stat {
    flex: 0 0 108px !important;
    width: 108px !important;
    min-width: 108px !important;
    min-height: 100px !important;
    height: 100px !important;
    padding: 11px 8px 10px !important;
    scroll-snap-align: start !important;
  }

  /* Overlay arrow indicators matching the default carousel treatment. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before,
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    position: absolute !important;
    z-index: 10 !important;
    top: 58% !important;
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pdw-primary) !important;
    background: rgba(255, 255, 255, .76) !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .14) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    font-size: 23px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    pointer-events: none !important;
    transform: translateY(-50%) !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before {
    left: 8px !important;
    content: none !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    right: 8px !important;
    content: none !important;
  }

  /* Age Breakdown fills the complete row below the overview carousel. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-panel-card:not(.pdw-overview-card) {
    min-height: 0 !important;
    height: 100% !important;
  }
}

/* =========================================================
   PEOPLE MOBILE — compact overview panel and arrow states
   560px and below only
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  /* Keep the grey Population Overview container, matching the other detail cards. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card {
    padding: 10px 10px !important;
    background: var(--pdw-panel) !important;
    border: 1px solid var(--pdw-border) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card > h4,
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card > h5 {
    margin: 0 0 7px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-two {
    padding-top: 0 !important;
    padding-bottom: 2px !important;
  }

  /* Hide the unavailable left arrow at the beginning of the carousel. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before {
    display: none !important;
    content: none !important;
  }

  /* Keep the right arrow visible until a real carousel button is added in JS. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    opacity: 1 !important;
  }
}


/* =========================================================
   PEOPLE MOBILE — functional carousel controls
   560px and below only
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  /* Remove the old visual-only pseudo arrows. */
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before,
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    display: none !important;
    content: none !important;
  }

  .pdw-population-carousel-nav {
    position: absolute !important;
    z-index: 20 !important;
    top: 58% !important;
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pdw-primary) !important;
    background: rgba(255, 255, 255, .86) !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .14) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    font: inherit !important;
    cursor: pointer !important;
    transform: translateY(-50%) !important;
  }

  .pdw-population-carousel-prev {
    left: 8px !important;
  }

  .pdw-population-carousel-next {
    right: 8px !important;
  }

  .pdw-population-carousel-nav span {
    display: block !important;
    font-size: 23px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transform: translateY(-1px) !important;
  }

  .pdw-population-carousel-nav:active {
    transform: translateY(-50%) scale(.94) !important;
  }

  .pdw-population-carousel-nav:disabled {
    display: none !important;
  }
}

/* Population Overview uses the widget's existing JS carousel controls. */
.pdw-population-carousel {
  position: relative;
  min-width: 0;
}

.pdw-population-carousel-nav {
  display: none;
}

@container pdw-widget (max-width: 560px) {
  .pdw-population-carousel {
    width: 100%;
    min-width: 0;
  }

  .pdw-view-frame.is-detail-view .pdw-population-carousel-track {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  .pdw-population-carousel-nav {
    display: flex !important;
  }

  .pdw-population-carousel-nav:disabled {
    display: none !important;
  }
}


/* Carousel arrows are removed whenever there is nowhere to scroll. */
.pdw-category-nav[hidden],
.pdw-stats-nav[hidden],
.pdw-population-carousel-nav[hidden],
.pdw-category-nav:disabled,
.pdw-stats-nav:disabled,
.pdw-population-carousel-nav:disabled {
  display: none !important;
}


/* Final Population carousel states: unavailable controls are completely removed. */
@container pdw-widget (max-width: 560px) {
  .pdw-population-carousel-nav[hidden],
  .pdw-population-carousel-nav[aria-hidden="true"],
  .pdw-population-carousel-nav.is-disabled,
  .pdw-population-carousel-nav:disabled {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}


/* Final mobile Population Overview arrow behavior: match the default pane. */
@media (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before,
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    content: none !important;
    display: none !important;
  }

  .pdw-population-carousel-prev[hidden],
  .pdw-population-carousel-prev:disabled,
  .pdw-population-carousel-prev[aria-hidden="true"],
  .pdw-population-carousel-prev.is-disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}


/* Population Overview mobile arrows: use the exact default summary nav state. */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::before,
  .pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-overview-card::after {
    content: none !important;
    display: none !important;
  }

  .pdw-population-carousel .pdw-stats-nav:disabled,
  .pdw-population-carousel .pdw-stats-nav[hidden],
  .pdw-population-carousel .pdw-stats-nav[aria-hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .pdw-population-carousel .pdw-stats-nav:not(:disabled):not([hidden]):not([aria-hidden="true"]) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* =========================================================
   POPULATION CATEGORY — clean desktop layout
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-population-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.pdw-view-frame.is-detail-view .pdw-population-stats {
  width: 100%;
  min-width: 0;
}

.pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

/* Match the Economy summary-card dimensions and typography. */
.pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-stat {
  width: auto;
  min-width: 0;
  min-height: 52px;
  height: auto;
  padding: 7px 9px;
}

/* Age Breakdown fills the remaining standard category height. */
.pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-compact-breakdown {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 11px 13px;
  box-sizing: border-box;
  overflow: hidden;
}

.pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-compact-breakdown h4,
.pdw-view-frame.is-detail-view .pdw-population-panel > .pdw-compact-breakdown h5 {
  flex: 0 0 auto;
  margin-bottom: 7px;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-compact-breakdown > .pdw-bar-row {
  display: flex;
  flex: 1 1 0;
  min-height: 23px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-compact-breakdown > .pdw-bar-row + .pdw-bar-row {
  margin-top: 0;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-compact-breakdown .pdw-bar-label {
  flex: 0 0 auto;
  margin-bottom: 4px;
  line-height: 1.15;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-compact-breakdown .pdw-bar-track {
  position: relative;
  display: block;
  flex: 0 0 7px;
  width: 100%;
  height: 7px;
  min-height: 7px;
  max-height: 7px;
  overflow: hidden;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-compact-breakdown .pdw-bar-track > i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 7px;
  min-height: 7px;
  max-width: 100%;
  background: var(--pdw-primary, #607EB8);
  border-radius: inherit;
}

@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
  }

  .pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-stat {
    min-height: 88px;
    padding: 10px 7px;
  }
}

/* =========================================================
   POPULATION — Income-matched six-card grid + vertical ages
   Final authoritative layout
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-population-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

/* Use the exact Economy/Income summary spacing and card sizing. */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-stat {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 12px 14px;
}

/* Vertical Age Breakdown graph sized to the existing remaining area. */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 13px 16px 12px;
  overflow: hidden;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns > h5 {
  flex: 0 0 auto;
  margin: 0 0 10px;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item {
  display: grid;
  grid-template-rows: auto minmax(55px, 1fr) auto;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item > strong {
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: var(--pdw-label);
  white-space: nowrap;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track {
  position: relative;
  align-self: stretch;
  width: min(30px, 62%);
  min-height: 55px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--pdw-track);
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track > i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  min-height: 3px;
  max-height: 100%;
  border-radius: 999px;
  background: var(--pdw-primary, #607EB8);
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item > span {
  font-size: 10px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--pdw-label);
  text-align: center;
  white-space: nowrap;
}

@container pdw-widget (max-width: 700px) {
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns-chart {
    gap: 7px;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track {
    width: min(24px, 70%);
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item > span {
    font-size: 9px;
  }
}

/* =========================================================
   640px and under — detail summary text matches default pane
   Applies only to People, Income and Housing summary boxes.
   ========================================================= */
@container pdw-widget (max-width: 640px) {
  .pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-stat strong,
  .pdw-view-frame.is-detail-view .pdw-economy-stats .pdw-mini-stat strong,
  .pdw-view-frame.is-detail-view .pdw-households-top-summary .pdw-mini-stat strong {
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.05 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-stat small,
  .pdw-view-frame.is-detail-view .pdw-economy-stats .pdw-mini-stat small,
  .pdw-view-frame.is-detail-view .pdw-households-top-summary .pdw-mini-stat small {
    margin-top: 5px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-stats .pdw-mini-stat em,
  .pdw-view-frame.is-detail-view .pdw-economy-stats .pdw-mini-stat em,
  .pdw-view-frame.is-detail-view .pdw-households-top-summary .pdw-mini-stat em {
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
  }
}

/* =========================================================
   560px and under — Population cards fill the complete row
   Remove inherited carousel padding that leaves blank space
   on the right side of the six-card grid.
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-grid-three {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-stat {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* =========================================================
   RADIUS BADGE — attached to the widget's top-right corner
   Uses the same corner-attached treatment as the map controls.
   ========================================================= */
.pdw-widget {
  position: relative;
}

.pdw-header {
  position: relative;
}

.pdw-radius-badge,
.pdw-header-radius {
  position: absolute !important;
  z-index: 5;
  top: 0 !important;
  right: 0 !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 9px 16px 9px 18px !important;
  color: var(--pdw-primary) !important;
  background: var(--pdw-soft) !important;
  border: 0 !important;
  border-radius: 0 0 0 16px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

/* Preserve room for the attached badge without moving the title. */
.pdw-header-row {
  padding-right: 118px;
}

@container pdw-widget (max-width: 560px) {
  .pdw-radius-badge,
  .pdw-header-radius {
    min-height: 32px !important;
    padding: 8px 13px 8px 15px !important;
    border-radius: 0 0 0 14px !important;
    font-size: 11px !important;
  }

  .pdw-header-row {
    padding-right: 96px;
  }
}

@container pdw-widget (max-width: 360px) {
  .pdw-header-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding-right: 88px !important;
  }

  .pdw-radius-badge,
  .pdw-header-radius {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    align-self: auto !important;
  }
}

/* =========================================================
   560px and under — stack Income and Employment panels
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-economy-panel .pdw-economy-visuals,
  .pdw-view-frame.is-detail-view .pdw-economy-visuals.pdw-split-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 10px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-panel-card,
  .pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-breakdown {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

/* =========================================================
   560px and under — align Employment legend and equalize panels
   ========================================================= */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-economy-panel .pdw-economy-visuals,
  .pdw-view-frame.is-detail-view .pdw-economy-visuals.pdw-split-panel {
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
  }

  .pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-panel-card,
  .pdw-view-frame.is-detail-view .pdw-economy-visuals > .pdw-breakdown {
    height: 100% !important;
    min-height: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-employment-donut-layout {
    grid-template-columns: 94px minmax(0, 1fr) !important;
    column-gap: 22px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-employment-legend {
    padding-left: 4px !important;
  }
}

/* =========================================================
   INCOME — rebuilt lollipop chart
   Uses fixed geometry instead of vertical transforms so every
   marker is centred consistently at every percentage.
   ========================================================= */
.pdw-income-lollipop-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.pdw-income-lollipop {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  row-gap: 8px;
}

.pdw-income-lollipop-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 36px;
  min-height: 0;
  align-items: center;
  column-gap: 8px;
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.pdw-income-lollipop-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdw-income-lollipop-row > strong {
  color: #657084;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.pdw-income-lollipop-track {
  position: relative;
  width: 100%;
  height: 6px;
  overflow: visible;
  background: var(--pdw-track);
  border-radius: 999px;
}

.pdw-income-lollipop-track i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 6px;
  background: var(--pdw-primary);
  border-radius: 999px;
}

.pdw-income-lollipop-track b {
  position: absolute;
  top: -2px;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  background: var(--pdw-primary);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
  transform: translateX(-50%);
  z-index: 2;
}

@container pdw-widget (max-width: 560px) {
  .pdw-income-lollipop-card {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .pdw-income-lollipop-card > h5 {
    margin-bottom: 8px !important;
  }

  .pdw-income-lollipop {
    row-gap: 5px !important;
  }

  .pdw-income-lollipop-row {
    grid-template-columns: 82px minmax(0, 1fr) 34px !important;
    column-gap: 7px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }

  .pdw-income-lollipop-row > strong {
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }
}


/* =========================================================
   AGE BREAKDOWN — standard thick vertical bars
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns-chart{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:12px;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item{
  display:grid;
  grid-template-rows:auto minmax(64px,1fr) auto;
  justify-items:center;
  gap:8px;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track{
  position:relative;
  width:22px;
  min-height:64px;
  border-radius:8px 8px 4px 4px;
  background:var(--pdw-track);
  overflow:hidden;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track>i{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  border-radius:8px 8px 4px 4px;
  background:var(--pdw-primary);
  min-height:4px;
}

@container pdw-widget (max-width:700px){
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns-chart{gap:8px;}
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-track{width:20px;min-height:58px;}
}


/* Match typography with other grey box charts */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item>span,
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-column-item>strong{
  color:#657084;
  font-size:12px;
  font-weight:600;
  line-height:1.3;
}

/* =========================================================
   PEOPLE CATEGORY — 561px and above alignment fix
   ========================================================= */
@container pdw-widget (min-width: 561px) {
  .pdw-view-frame.is-detail-view .pdw-population-panel {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: stretch !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel > *,
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats,
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-three,
  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }
}


/* =========================================================
   EDUCATION LEVEL ACHIEVED — final flat-color override
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-education-attainment-heading {
  display: block !important;
  margin-bottom: 10px !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-heading h5 {
  margin: 0 !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-icon {
  display: none !important;
}

.pdw-view-frame.is-detail-view .pdw-education-attainment-track > i,
.pdw-view-frame.is-detail-view .pdw-education-attainment > div:nth-child(n) .pdw-education-attainment-track > i,
.pdw-education-attainment-row[class*="tone-"] .pdw-education-attainment-track > i {
  background: var(--pdw-primary) !important;
  background-color: var(--pdw-primary) !important;
  background-image: none !important;
  background-size: auto !important;
  background-position: initial !important;
  background-repeat: initial !important;
}


/* =========================================================
   PEOPLE — match Income left/right and bottom spacing
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-population-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 7px !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats,
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-mini-grid-three,
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Use the same panel padding as the Income chart boxes. */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-age-columns {
  height: 100% !important;
  min-height: 0 !important;
  padding: 11px 13px !important;
  align-self: stretch !important;
}

/* Match Income's internal summary spacing. */
.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-grid-three {
  gap: 5px !important;
}

.pdw-view-frame.is-detail-view .pdw-population-panel .pdw-population-stats .pdw-mini-stat {
  padding: 7px 9px !important;
}


/* =========================================================
   LANGUAGES SPOKEN — fill available card height
   ========================================================= */

.pdw-language-bars{
  display:flex !important;
  flex-direction:column;
  height:100%;
  gap:10px;
}

.pdw-language-row{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.pdw-language-bars-card{
  display:flex;
  flex-direction:column;
}

.pdw-language-bars-card .pdw-language-bars{
  flex:1;
}


/* =========================================================
   LANGUAGES SPOKEN — retain full height and full graph width
   ========================================================= */
.pdw-view-frame.is-detail-view .pdw-language-bars-card {
  display: flex !important;
  min-width: 0 !important;
  height: 100% !important;
  flex-direction: column !important;
}

.pdw-view-frame.is-detail-view .pdw-language-bars-card .pdw-language-bars {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.pdw-view-frame.is-detail-view .pdw-language-bars .pdw-language-row {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 0 !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.pdw-view-frame.is-detail-view .pdw-language-label,
.pdw-view-frame.is-detail-view .pdw-language-track {
  width: 100% !important;
  min-width: 0 !important;
}


/* =========================================================
   ETHNICITY BREAKDOWN — treemap
   ========================================================= */
.pdw-ethnicity-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.pdw-ethnicity-treemap {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-content: stretch;
  gap: 4px;
  overflow: hidden;
  border-radius: 10px;
}

.pdw-ethnicity-tile {
  display: flex;
  min-width: 74px;
  min-height: 58px;
  flex: var(--pdw-tile-share) 1 calc(var(--pdw-tile-share) * 1%);
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pdw-primary);
  color: #fff;
}

.pdw-ethnicity-tile span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pdw-ethnicity-tile strong {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1;
}

.pdw-ethnicity-tile.tone-1 { background: var(--pdw-primary); }
.pdw-ethnicity-tile.tone-2 { background: color-mix(in srgb, var(--pdw-primary) 86%, white); }
.pdw-ethnicity-tile.tone-3 { background: color-mix(in srgb, var(--pdw-primary) 74%, white); }
.pdw-ethnicity-tile.tone-4 { background: color-mix(in srgb, var(--pdw-primary) 62%, white); }
.pdw-ethnicity-tile.tone-5 { background: color-mix(in srgb, var(--pdw-primary) 52%, white); }
.pdw-ethnicity-tile.tone-6 { background: color-mix(in srgb, var(--pdw-primary) 42%, white); }
.pdw-ethnicity-tile.tone-7 { background: color-mix(in srgb, var(--pdw-primary) 32%, white); color: #334155; }

@media (max-width: 560px) {
  .pdw-ethnicity-treemap {
    gap: 3px;
  }

  .pdw-ethnicity-tile {
    min-width: 62px;
    min-height: 50px;
    padding: 8px;
  }

  .pdw-ethnicity-tile span {
    font-size: 10px;
  }

  .pdw-ethnicity-tile strong {
    font-size: 12px;
  }
}


/* =========================================================
   Mobile map attribution — background ends with the text
   ========================================================= */
@container (max-width: 640px) {
  .pdw-map .leaflet-control-attribution.is-expanded {
    width: 100% !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content {
    right: 28px !important;
    left: auto !important;
    width: max-content !important;
    max-width: calc(100% - 28px) !important;
    padding: 0 8px !important;
    border-radius: 8px 0 0 0 !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 4px 14px rgba(21,32,51,.10) !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-toggle {
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 4px 14px rgba(21,32,51,.10) !important;
  }
}


/* Attribution pill joins directly to the (i) button */
@container (max-width: 640px) {
  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content{
    right:0 !important;
    max-width:calc(100% - 1px) !important;
    border-top-right-radius:0 !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-toggle{
    margin-left:0 !important;
  }
}


/* Prevent the final attribution item (Leaflet) from being clipped */
@container (max-width: 640px) {
  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content {
    box-sizing: border-box !important;
    width: max-content !important;
    max-width: calc(100% - 1px) !important;
    padding-right: 36px !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content a:last-child,
  .pdw-map .leaflet-control-attribution.is-expanded .pdw-attribution-content span:last-child {
    margin-right: 0 !important;
  }
}


@container pdw-widget (max-width:560px){
  .pdw-view-frame.is-detail-view .pdw-education-attainment{
    grid-template-columns:1fr !important;
    grid-template-rows:none !important;
    gap:12px !important;
  }
}


/* EDUCATION <=560: do not inherit scaled typography; fill the entire detail area */
@container pdw-widget (max-width: 560px) {
  .pdw-view-frame.is-detail-view .pdw-tab-panel-education {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    padding: 2px 20px 9px !important;
    flex-direction: column !important;
    transform: none !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-panel-toolbar {
    flex: 0 0 auto !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-card {
    display: flex !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 1 1 auto !important;
    padding: 11px 13px !important;
    flex-direction: column !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-heading {
    flex: 0 0 auto !important;
    margin-bottom: 8px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment {
    display: grid !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 1 1 auto !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(0, 1fr) !important;
    align-content: stretch !important;
    gap: 7px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-row {
    display: flex !important;
    min-height: 0 !important;
    width: 100% !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-label,
  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-label span,
  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-label strong {
    color: #657084 !important;
    font-family: var(--pdw-font, "Poppins", sans-serif) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-label {
    display: flex !important;
    margin-bottom: 5px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .pdw-view-frame.is-detail-view .pdw-tab-panel-education .pdw-education-attainment-track {
    height: 6px !important;
  }
}


/* <=480px: add space between the detail/summary content and the map */
@container pdw-widget (max-width: 480px) {
  .pdw-view-frame {
    margin-bottom: 20px !important;
  }
}


/* Real mobile spacer above the map */
.pdw-map-mobile-spacer {
  display: none;
  width: 100%;
  height: 0;
  flex: 0 0 auto;
}

@container pdw-widget (max-width: 480px) {
  .pdw-map-mobile-spacer {
    display: block !important;
    height: 10px !important;
    min-height: 10px !important;
  }

  .pdw-view-frame {
    margin-bottom: 0 !important;
  }

  .pdw-map-card {
    margin-top: 0 !important;
  }
}

/* Fallback for layouts where container queries are unavailable */
@media (max-width: 480px) {
  .pdw-widget .pdw-map-mobile-spacer {
    display: block !important;
    height: 10px !important;
    min-height: 10px !important;
  }
}


/* Restore and enlarge summary category icons */
.pdw-view-frame.is-summary-view .pdw-category-icon svg{
    width:24px !important;
    height:24px !important;
}

@container pdw-widget (max-width:700px){
  .pdw-view-frame.is-summary-view .pdw-category-icon svg{
      width:22px !important;
      height:22px !important;
  }
}

/* Premium view transitions: fast, subtle and intentionally restrained. */
.pdw-view-frame {
  transform-origin: center top;
  will-change: opacity, transform;
  transition:
    opacity 220ms cubic-bezier(.22, .61, .36, 1),
    transform 220ms cubic-bezier(.22, .61, .36, 1);
}

.pdw-view-frame.is-leaving {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

.pdw-view-frame.is-entering {
  opacity: 0;
  transform: translateY(7px);
  pointer-events: none;
}

.pdw-view-frame.is-entered {
  opacity: 1;
  transform: translateY(0);
}

.pdw-category,
.pdw-category > span:last-child,
.pdw-category-icon,
.pdw-category::after,
.pdw-back-button {
  transition-duration: 220ms !important;
  transition-timing-function: cubic-bezier(.22, .61, .36, 1) !important;
}

.pdw-category {
  transition-property: color, background-color, border-color, box-shadow !important;
}

.pdw-category > span:last-child {
  transition-property: color, font-weight !important;
}

.pdw-category-icon {
  transition-property: color, background-color !important;
}

.pdw-category::after {
  transition-property: opacity, transform !important;
}

.pdw-back-button {
  opacity: 1;
  transform: translateY(0);
  transition-property: color, opacity, transform !important;
}

.pdw-view-frame.is-entering .pdw-back-button {
  opacity: 0;
  transform: translateY(4px);
}

.pdw-view-frame.is-entered .pdw-back-button {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pdw-view-frame,
  .pdw-category,
  .pdw-category > span:last-child,
  .pdw-category-icon,
  .pdw-category::after,
  .pdw-back-button {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}


/* INITIAL LOAD SKELETON — current widget layout */
.pdw-sdk-state {
  min-height: 0;
}

.pdw-sdk-skeleton {
  width: 100%;
  padding: 26px 24px 12px;
}

.pdw-sdk-shimmer {
  display: block;
  overflow: hidden;
  background: linear-gradient(90deg, #edf1f6 24%, #f7f9fc 43%, #edf1f6 62%);
  background-size: 240% 100%;
  border-radius: 999px;
  animation: pdw-sdk-shimmer 1.45s ease-in-out infinite;
}

@keyframes pdw-sdk-shimmer {
  from { background-position: 115% 0; }
  to { background-position: -115% 0; }
}

.pdw-sdk-skeleton-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.pdw-sdk-heading-copy {
  min-width: 0;
  flex: 1;
}

.pdw-sdk-title-line {
  width: min(310px, 58%);
  height: 38px;
}

.pdw-sdk-description-line {
  width: min(540px, 76%);
  height: 13px;
  margin-top: 12px;
}

.pdw-sdk-radius-line {
  width: 105px;
  height: 32px;
  flex: 0 0 105px;
}

.pdw-sdk-highlight-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 15px;
}

.pdw-sdk-highlight-lines span {
  width: 112px;
  height: 12px;
}

.pdw-sdk-highlight-lines span:nth-child(2) { width: 132px; }
.pdw-sdk-highlight-lines span:nth-child(3) { width: 96px; }
.pdw-sdk-highlight-lines span:nth-child(4) { width: 122px; }

.pdw-sdk-tab-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 22px;
  border-bottom: 1px solid var(--pdw-border);
}

.pdw-sdk-tab-item {
  display: flex;
  min-height: 62px;
  padding: 8px 4px 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
}

.pdw-sdk-tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.pdw-sdk-tab-label {
  width: 58px;
  height: 10px;
}

.pdw-sdk-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pdw-sdk-skeleton-card {
  min-width: 0;
  min-height: 98px;
  padding: 15px 14px;
  background: #fff;
  border: 1px solid var(--pdw-border);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(16,24,40,.035);
}

.pdw-sdk-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdw-sdk-icon-line {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
}

.pdw-sdk-value-line {
  width: 62%;
  height: 20px;
}

.pdw-sdk-label-line {
  width: 72%;
  height: 10px;
  margin-top: 12px;
}

.pdw-sdk-wide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.pdw-sdk-wide-card {
  display: flex;
  min-height: 148px;
  padding: 22px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--pdw-panel);
  border: 1px solid var(--pdw-border);
  border-radius: 18px;
}

.pdw-sdk-wide-copy {
  min-width: 0;
  flex: 1;
}

.pdw-sdk-kicker-line { width: 62px; height: 8px; }
.pdw-sdk-wide-title { width: 145px; height: 17px; margin-top: 9px; }
.pdw-sdk-wide-text { width: min(185px, 82%); height: 10px; margin-top: 12px; }
.pdw-sdk-ring-line { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; }

.pdw-sdk-map-line {
  width: 100%;
  height: 250px;
  margin-top: 18px;
  border-radius: 18px;
}

.pdw-sdk-powered-line {
  display: flex;
  min-height: 42px;
  align-items: flex-end;
  justify-content: flex-end;
}

.pdw-sdk-powered-line span {
  width: 118px;
  height: 18px;
}

.pdw-initial-enter {
  animation: pdw-initial-enter 220ms cubic-bezier(.22,.61,.36,1) both;
}

@keyframes pdw-initial-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pdw-sdk-skeleton { padding-left: 24px; padding-right: 24px; }
  .pdw-sdk-card-grid { gap: 9px; }
  .pdw-sdk-skeleton-card { min-height: 92px; padding: 13px 10px; }
  .pdw-sdk-icon-line { width: 28px; height: 28px; flex-basis: 28px; }
}

@container pdw-widget (max-width: 700px) {
  .pdw-sdk-skeleton { padding: 20px 20px 10px; }
  .pdw-sdk-title-line { width: min(245px, 70%); height: 31px; }
  .pdw-sdk-description-line { width: 88%; }
  .pdw-sdk-radius-line { width: 92px; height: 29px; flex-basis: 92px; }
  .pdw-sdk-highlight-lines span:nth-child(n+4) { display: none; }
  .pdw-sdk-tab-grid { overflow: hidden; grid-template-columns: repeat(6, minmax(72px, 1fr)); }
  .pdw-sdk-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .pdw-sdk-skeleton-card { min-height: 91px; padding: 12px 10px; }
  .pdw-sdk-wide-grid { grid-template-columns: 1fr; }
  .pdw-sdk-wide-card { min-height: 135px; padding: 18px; }
  .pdw-sdk-map-line { height: 150px; }
  .pdw-sdk-powered-line span { width: 96px; height: 14px; }
}

@container pdw-widget (max-width: 560px) {
  .pdw-sdk-skeleton-header { gap: 12px; }
  .pdw-sdk-title-line { width: min(220px, 68%); height: 28px; }
  .pdw-sdk-description-line { width: 96%; }
  .pdw-sdk-highlight-lines { gap: 8px 12px; }
  .pdw-sdk-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdw-sdk-skeleton-card:nth-child(n+4) { display: none; }
  .pdw-sdk-card-top { flex-direction: column; gap: 8px; }
  .pdw-sdk-value-line { width: 68%; }
  .pdw-sdk-label-line { width: 82%; margin: 9px auto 0; }
}

@container pdw-widget (max-width: 412px) {
  .pdw-sdk-skeleton { padding-left: 16px; padding-right: 16px; }
  .pdw-sdk-title-line { width: 170px; height: 25px; }
  .pdw-sdk-radius-line { width: 82px; height: 27px; flex-basis: 82px; }
  .pdw-sdk-highlight-lines span:nth-child(n+3) { display: none; }
  .pdw-sdk-card-grid { gap: 7px; }
  .pdw-sdk-skeleton-card { padding: 11px 8px; }
  .pdw-sdk-wide-card { padding: 16px; }
  .pdw-sdk-ring-line { width: 74px; height: 74px; flex-basis: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdw-sdk-shimmer,
  .pdw-initial-enter {
    animation: none !important;
  }
}


/* DOWNLOAD REPORT HEADER ACTION */
.pdw-header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.pdw-download-report {
  appearance: none;
  display: inline-flex;
  min-height: 38px;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--pdw-primary);
  background: #fff;
  border: 1px solid var(--pdw-border);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pdw-download-report svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.pdw-download-report:hover {
  background: var(--pdw-soft);
  border-color: color-mix(in srgb, var(--pdw-primary) 18%, white);
  box-shadow: 0 5px 14px rgba(16, 24, 40, .08);
  transform: translateY(-1px);
}

.pdw-download-report:active {
  box-shadow: none;
  transform: translateY(0);
}

.pdw-download-report:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pdw-primary) 40%, white);
  outline-offset: 2px;
}

@container pdw-widget (max-width: 700px) {
  .pdw-header-actions {
    gap: 6px;
  }

  .pdw-download-report {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 11px;
  }
}

@container pdw-widget (max-width: 480px) {
  .pdw-download-report span {
    display: none;
  }

  .pdw-download-report {
    width: 36px;
    padding: 0;
  }
}


/* FINAL HEADER POSITIONING — centered radius attached to top edge */
.pdw-widget {
  position: relative !important;
}

.pdw-header {
  position: relative !important;
  padding-top: 30px !important;
}

.pdw-header-row {
  padding-right: 0 !important;
}

.pdw-header .pdw-radius-badge.pdw-header-radius {
  position: absolute !important;
  z-index: 20 !important;
  top: 0 !important;
  right: auto !important;
  left: 50% !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 9px 17px !important;
  color: var(--pdw-primary) !important;
  background: var(--pdw-soft) !important;
  border: 0 !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  transform: translateX(-50%) !important;
}

.pdw-header-actions {
  flex-direction: row !important;
  align-items: flex-start !important;
}

@container pdw-widget (max-width: 560px) {
  .pdw-header {
    padding-top: 28px !important;
  }

  .pdw-header-row {
    padding-right: 0 !important;
  }

  .pdw-header .pdw-radius-badge.pdw-header-radius {
    top: 0 !important;
    right: auto !important;
    left: 50% !important;
    min-height: 32px !important;
    padding: 8px 14px !important;
    border-radius: 0 0 14px 14px !important;
    font-size: 11px !important;
    transform: translateX(-50%) !important;
  }
}

@container pdw-widget (max-width: 360px) {
  .pdw-header-row {
    justify-content: space-between !important;
    padding-right: 0 !important;
  }

  .pdw-header .pdw-radius-badge.pdw-header-radius {
    top: 0 !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}


/* Exact restored radius label: flush against the map's top-left corner. */
.pdw-map-context {
  top: 0 !important;
  left: 0 !important;
  min-width: 0 !important;
  padding: 8px 13px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
  background: rgba(255, 255, 255, .88) !important;
  border: 0 !important;
  border-radius: 0 0 10px 0 !important;
  box-shadow: 0 4px 14px rgba(21, 32, 51, .08) !important;
}

.pdw-map-context strong {
  display: none !important;
}

.pdw-map-context span {
  color: var(--pdw-primary) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* =========================================================
   LOCAL INSIGHTS WIDGET
   ========================================================= */
.pli-widget {
  overflow: hidden;
}

.pli-header {
  padding-bottom: 24px;
}

.pli-header h2 {
  margin: 0;
}

.pli-stats-carousel {
  padding-top: 4px;
  margin-bottom: 22px;
}

.pli-lead-card {
  position: relative;
  height: 242px;
  min-height: 242px;
  margin: 0 24px 22px;
  border: 1px solid color-mix(in srgb, var(--pdw-primary) 18%, #dfe5ee);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pdw-primary) 7%, white), #fff 62%);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .055);
  overflow: hidden;
}

.pli-lead-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy copy"
    "bubbles action";
  align-items: end;
  justify-items: stretch;
  gap: 15px 24px;
  height: 242px;
  min-height: 242px;
  padding: 24px 30px 24px;
}

.pli-lead-copy {
  grid-area: copy;
  width: 100%;
}

.pli-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--pdw-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pli-lead-copy h3,
.pli-form-heading h3,
.pli-success-panel h3 {
  margin: 0 0 8px;
  color: #4F596A;
  font-size: 22px;
  line-height: 1.25;
}

.pli-lead-copy > p,
.pli-form-heading p,
.pli-success-panel p {
  max-width: 620px;
  margin: 0;
  color: #657084;
  font-size: 13px;
  line-height: 1.65;
}

.pli-feature-list {
  grid-area: bubbles;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: end;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 0;
  padding: 0;
}

.pli-feature-list span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--pdw-primary) 14%, #e4e8ef);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #566277;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pli-feature-list svg {
  width: 16px;
  height: 16px;
  fill: var(--pdw-primary);
}

.pli-lead-action {
  grid-area: action;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-self: end;
  align-self: end;
}

.pli-primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0 21px;
  border: 1px solid var(--pdw-primary);
  border-radius: 9px;
  background: var(--pdw-primary);
  color: #fff;
  font: 600 13px/1 var(--pdw-font);
  cursor: pointer;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--pdw-primary) 24%, transparent);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.pli-primary-button:hover {
  filter: brightness(1.045);
  transform: translateY(-1px);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--pdw-primary) 30%, transparent);
}

.pli-form-panel {
  height: 242px;
  min-height: 242px;
  box-sizing: border-box;
  padding: 16px 30px 22px;
  animation: pliFadeIn 220ms ease both;
}

.pli-form-back {
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pdw-primary);
  font: 600 11px/1 var(--pdw-font);
  cursor: pointer;
}

.pli-form-heading {
  margin-bottom: 10px;
}

.pli-lead-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.pli-lead-form label {
  display: grid;
  gap: 6px;
}

.pli-lead-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #4F596A;
  font: 500 12px/1 var(--pdw-font);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.pli-lead-form input:focus {
  border-color: color-mix(in srgb, var(--pdw-primary) 70%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pdw-primary) 12%, transparent);
}

.pli-submit-button {
  min-width: 195px;
  height: 42px;
  grid-column: 1 / -1;
  justify-self: end;
}

.pli-form-error {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: #b54747;
  font-size: 11px;
  font-weight: 600;
}

.pli-success-panel {
  display: flex;
  min-height: 220px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  animation: pliFadeIn 220ms ease both;
}

.pli-success-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pdw-primary) 13%, white);
  color: var(--pdw-primary);
  font-size: 20px;
  font-weight: 700;
}

.pli-success-panel p {
  margin-bottom: 18px;
}

@keyframes pliFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .pli-lead-preview {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "bubbles"
      "action";
    gap: 22px;
    padding: 24px;
  }

  .pli-lead-action {
    width: auto;
    min-width: 0;
    justify-self: center;
  }

  .pli-lead-action .pli-primary-button {
    width: auto;
  }

  .pli-lead-form {
    grid-template-columns: 1fr 1fr;
  }

  .pli-submit-button {
    width: 100%;
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .pli-lead-card {
    margin-right: 14px;
    margin-left: 14px;
    border-radius: 11px;
  }

  .pli-lead-preview,
  .pli-form-panel {
    padding: 21px 18px 18px;
  }

  .pli-lead-copy h3,
  .pli-form-heading h3,
  .pli-success-panel h3 {
    font-size: 19px;
  }

  .pli-feature-list {
    max-width: none;
  }

  .pli-feature-list span {
    gap: 5px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .pli-feature-list svg {
    width: 14px;
    height: 14px;
  }

  .pli-lead-form {
    grid-template-columns: 1fr;
  }

  .pli-submit-button,
  .pli-form-error {
    grid-column: auto;
  }
}


/* Local Insights visibility states */
.pli-success-panel[hidden],
.pli-form-panel[hidden],
.pli-form-error[hidden] {
  display: none !important;
}


/* Local Insights view switching */
.pli-lead-preview[hidden],
.pli-form-panel[hidden],
.pli-success-panel[hidden] {
  display: none !important;
}

/* Match Local Lifestyle title sizing at compact widget widths. */
@container pdw-widget (min-width: 501px) and (max-width: 640px) {
  .pdw-header h2 {
    font-size: 23px !important;
    line-height: 1.08 !important;
  }
}

@container pdw-widget (max-width: 500px) {
  .pdw-header h2 {
    font-size: 20px !important;
    line-height: 1.08 !important;
  }
}

/* Local Insights gutter and summary-card authority. */
@container pdw-widget (min-width: 900px) {
  .pli-lead-card {
    margin-left: 24px !important;
    margin-right: 24px !important;
  }
}

@container pdw-widget (min-width: 701px) and (max-width: 899px) {
  .pli-lead-card {
    margin-left: 24px !important;
    margin-right: 24px !important;
  }
}

@container pdw-widget (max-width: 700px) {
  .pdw-header,
  .pdw-stats-carousel,
  .pdw-powered {
    box-sizing: border-box !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .pdw-stats-carousel {
    width: 100% !important;
    margin: -4px 0 22px !important;
    padding-top: 0 !important;
  }

  .pli-lead-card {
    margin-left: 18px !important;
    margin-right: 18px !important;
  }

  .pli-feature-list .pli-market-trends {
    display: none !important;
  }
}

/* At tablet widths, the five summary cards share the full available row. */
@container pdw-widget (min-width: 561px) and (max-width: 700px) {
  .pdw-stats {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .pdw-stat-card {
    flex: none !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* Keep the summary-to-report transition compact at every widget width. */
.pli-stats-carousel {
  margin-bottom: 16px !important;
}

@container pdw-widget (max-width: 620px) {
  .pli-feature-list .pli-amenities {
    display: none !important;
  }
}

@container pdw-widget (max-width: 580px) {
  .pli-feature-list .pli-transit {
    display: none !important;
  }
}

@container pdw-widget (max-width: 400px) {
  .pli-lead-preview,
  .pli-form-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@container pdw-widget (max-width: 412px) {
  .pli-report-description-full {
    display: none !important;
  }

  .pli-report-description-compact {
    display: inline !important;
  }

  .pli-feature-list .pli-housing {
    display: none !important;
  }
}

@container pdw-widget (min-width: 561px) {
  .pli-feature-list,
  .pli-feature-list span {
    justify-content: flex-start;
  }
}

/* Keep the report preview and opened form heading on the same scale. */
.pli-lead-copy h3,
.pli-form-heading h3 {
  font-size: 24px !important;
}

@container pdw-widget (min-width: 501px) and (max-width: 640px) {
  .pli-lead-copy h3,
  .pli-form-heading h3 {
    font-size: 18px !important;
  }
}

@container pdw-widget (max-width: 500px) {
  .pli-lead-copy h3,
  .pli-form-heading h3 {
    font-size: 16px !important;
  }
}

@container pdw-widget (max-width: 380px) {
  .pdw-header h2 {
    font-size: 18px !important;
  }

  .pli-lead-copy h3,
  .pli-form-heading h3 {
    font-size: 15px !important;
  }
}

@container pdw-widget (max-width: 340px) {
  .pdw-header h2 {
    font-size: 16px !important;
  }
}

@container pdw-widget (max-width: 480px) {
  .pli-stats-carousel {
    margin-top: 0 !important;
    padding-top: 5px !important;
  }
}

/* Keep the form action aligned with the preview action at the panel bottom. */
.pli-form-panel {
  display: flex;
  flex-direction: column;
}

.pli-form-back {
  align-self: flex-start;
}

.pli-lead-form {
  flex: 1 1 auto;
  min-height: 0;
  align-content: space-between;
}

/* The report form uses the full content area while retaining the widget header and footer. */
.pli-widget.pli-report-form-open .pli-lead-card {
  position: absolute;
  z-index: 10;
  top: var(--pli-report-overlay-top, 0px);
  right: 0;
  bottom: var(--pli-report-overlay-bottom, 0px);
  left: 0;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: auto;
}

.pli-widget.pli-report-form-open .pli-form-panel,
.pli-widget.pli-report-form-open .pli-success-panel {
  width: 100%;
  height: 100% !important;
  min-height: 100% !important;
}

/* Shared main-title scale for compact embeds. */
@container pdw-widget (min-width: 501px) and (max-width: 640px) {
  .pdw-header h2 { font-size: 23px !important; line-height: 1.08 !important; }
}
@container pdw-widget (min-width: 381px) and (max-width: 500px) {
  .pdw-header h2 { font-size: 20px !important; line-height: 1.08 !important; }
}
@container pdw-widget (min-width: 341px) and (max-width: 380px) {
  .pdw-header h2 { font-size: 18px !important; line-height: 1.08 !important; }
}
@container pdw-widget (max-width: 340px) {
  .pdw-header h2 { font-size: 16px !important; line-height: 1.08 !important; }
}

@container pdw-widget (max-width: 560px) {
  .pli-lead-card,
  .pli-lead-preview,
  .pli-form-panel {
    height: 280px;
    min-height: 280px;
  }

  .pli-lead-preview {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 18px !important;
  }

  .pli-lead-copy {
    flex: 0 0 auto;
    order: 1;
    padding-top: 0 !important;
  }

  .pli-feature-list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center !important;
    order: 2;
    width: 100%;
    max-width: none;
    gap: 4px;
    margin-top: 10px !important;
    padding-top: 0 !important;
  }

  .pli-feature-list span {
    flex: 1 1 0;
    justify-content: center !important;
    min-width: 0;
    padding-right: 3px;
    padding-left: 3px;
  }

  .pli-lead-action {
    align-self: center;
    order: 3;
    margin-top: auto !important;
    padding-bottom: 0 !important;
  }

  .pli-lead-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


@container pdw-widget (min-width: 701px) {
  .pli-stats-carousel {
    margin-top: -5px !important;
  }
}

/* Keep validation feedback beside, rather than below, the form action. */
@container pdw-widget (min-width: 561px) {
  .pli-submit-button {
    grid-column: -2 / -1 !important;
    grid-row: 2 !important;
    width: auto !important;
    justify-self: end !important;
  }

  .pli-form-error {
    display: -webkit-box;
    grid-column: 1 / -2 !important;
    grid-row: 2 !important;
    align-self: center;
    max-width: 100%;
    max-height: 2.7em;
    margin: 0 !important;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@container pdw-widget (max-width: 799px) {
  .pli-feature-list .pli-lifestyle-data {
    display: none !important;
  }
}

/* Validation feedback and the action share the area directly below the fields. */
.pli-lead-form {
  align-content: normal;
}

.pli-submit-button {
  white-space: nowrap;
}

.pli-form-description-compact {
  display: none;
}

.pli-form-description-tiny {
  display: none;
}

@container pdw-widget (max-width: 360px) {
  .pli-form-description-compact {
    display: none !important;
  }

  .pli-form-description-tiny {
    display: inline !important;
  }
}

.pli-report-description-compact {
  display: none;
}

.pli-form-error-compact {
  display: none;
}

@container pdw-widget (max-width: 480px) {
  .pli-form-error-full {
    display: none;
  }

  .pli-form-error-compact {
    display: inline;
  }
}

.pli-form-error-tiny {
  display: none;
}

@container pdw-widget (max-width: 360px) {
  .pli-form-error-compact {
    display: none !important;
  }

  .pli-form-error-tiny {
    display: inline !important;
  }
}

@container pdw-widget (min-width: 561px) {
  .pli-lead-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .pli-lead-form label {
    grid-row: 1;
  }

  .pli-submit-button {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    width: auto !important;
    justify-self: end !important;
    align-self: end;
  }

  .pli-form-error {
    display: -webkit-box;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    align-self: start;
    max-height: 2.7em;
    margin: 0 !important;
    padding-right: 0;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@container pdw-widget (max-width: 560px) {
  .pli-form-description-full {
    display: none;
  }

  .pli-form-description-compact {
    display: inline;
  }

  .pli-lead-form {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }

  .pli-lead-form label:nth-of-type(1),
  .pli-lead-form label:nth-of-type(2) {
    grid-row: 1;
  }

  .pli-lead-form label:nth-of-type(3),
  .pli-lead-form label:nth-of-type(4) {
    grid-row: 2;
  }

  .pli-submit-button {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    width: 100% !important;
    justify-self: stretch !important;
    align-self: end;
  }

  .pli-form-error {
    display: -webkit-box;
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    align-self: start;
    max-height: 2.7em;
    margin: 0 !important;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@container pdw-widget (min-width: 561px) and (max-width: 650px) {
  .pli-lead-form {
    grid-template-rows: auto auto auto;
    row-gap: 8px;
  }

  .pli-submit-button {
    grid-row: 3 !important;
    align-self: start;
  }
}

@container pdw-widget (max-width: 560px) {
  .pli-lead-form {
    grid-template-rows: auto auto auto auto;
    row-gap: 8px;
  }

  .pli-submit-button {
    grid-row: 4 !important;
    align-self: start;
  }

  .pli-lead-form:has(.pli-form-error:not([hidden])) .pli-submit-button {
    margin-top: 12px;
  }
}

/* Keep the mobile title position consistent across widget headers. */
@container pdw-widget (max-width: 640px) {
  .pdw-header { padding-top: 20px !important; }
}

/* Keep every compact title on the shared 30 / 23 / 20px scale. */
@container pdw-widget (min-width: 481px) and (max-width: 640px) {
  .pdw-header h2 { font-size: 23px !important; line-height: 1.08 !important; }
}

@container pdw-widget (max-width: 480px) {
  .pdw-header h2 { font-size: 20px !important; line-height: 1.08 !important; }
}
