@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville&display=swap');
:root {
  font-family: 'DM Sans', sans-serif;
  color: #26392f;
  background: #f7f6f1;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
p {
  color: #738075;
  line-height: 1.6;
}
.stats {
  background: #e9eee3;
  border-radius: 8px;
  padding: 15px;
  font-size: 13px;
  margin: 22px 0;
}
.stats strong {
  font-size: 22px;
  display: block;
  margin-bottom: 5px;
}
.profile {
  border: 1px solid #d6dcd1;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 22px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
form {
  margin-top: 15px;
}
label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin: 12px 0;
}
input {
  width: 62px;
  border: 1px solid #cdd6ca;
  border-radius: 5px;
  padding: 7px;
  background: #fff;
}
button {
  cursor: pointer;
  background: #365942;
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  font: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
form > button {
  width: 100%;
  margin-top: 15px;
}
textarea {
  width: 100%;
  height: 260px;
  margin-top: 12px;
  font: 11px monospace;
  border: 1px solid #ced8ca;
  border-radius: 4px;
  padding: 10px;
}
form details {
  margin-top: 15px;
  font-size: 12px;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h2 {
  font-size: 15px;
  font-weight: 600;
}
select {
  border: 1px solid #cbd5c7;
  background: #fff;
  padding: 6px;
  border-radius: 5px;
  color: #3d5841;
}
.hint {
  font-size: 11px;
  margin: 6px 0 18px;
}
.street {
  display: block;
  width: 100%;
  text-align: left;
  background: #fffefb;
  color: #2c4232;
  border: 1px solid #e0e4da;
  margin-bottom: 10px;
  padding: 15px;
}
.street:hover,
.street.active {
  border-color: #63856a;
  background: #eff3e9;
}
.street strong {
  display: block;
  font-size: 14px;
}
.street small {
  display: block;
  color: #7b897d;
  margin-top: 8px;
}
.pill {
  display: inline-block;
  border-radius: 12px;
  padding: 3px 8px;
  background: #edf0e5;
  color: #677b4d;
  font-size: 10px;
  margin: 8px 5px 0 0;
}
.pill.pass,
.pill.qualified {
  background: #dceadd;
  color: #335d3b;
}
.pill.fail,
.pill.excluded {
  background: #f2dfd8;
  color: #975342;
}
.pill.unknown,
.pill.potential {
  background: #f3ead2;
  color: #8b7132;
}
.leaflet-tile-pane {
  transition: filter 200ms ease;
}
#blend-controls {
  position: absolute;
  top: 16px;
  left: 64px;
  z-index: 550;
  background: #fffefa;
  padding: 10px 12px;
  border-radius: 7px;
  box-shadow: 0 2px 12px #283c2920;
  font-size: 12px;
}
#blend-controls label {
  display: block;
  margin-bottom: 5px;
}
#blend-mode,
#poi-zoom-cutoff {
  min-width: 160px;
}
#map-info {
  position: absolute;
  bottom: 25px;
  left: 20px;
  z-index: 500;
  background: #fffefa;
  box-shadow: 0 2px 12px #283c2920;
  padding: 12px;
  border-radius: 7px;
  font-size: 11px;
}
#detail {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 400px;
  max-height: calc(100% - 85px);
  overflow: auto;
  z-index: 600;
  background: #fffefa;
  box-shadow: 0 8px 35px #26352630;
  border-radius: 10px;
  padding: 24px;
}
#detail h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 20px;
  line-height: 1.4;
  margin-top: 5px;
}
.close {
  float: right;
  background: none;
  color: #66745c;
  font-size: 22px;
  padding: 0;
}
.criterion {
  border-top: 1px solid #e5e7dc;
  padding: 12px 0;
}
.criterion h3 {
  font-size: 12px;
  margin: 2px 0;
}
.criterion p,
.criterion li {
  font-size: 11px;
  color: #64735f;
}
.criterion ul {
  padding-left: 16px;
}
pre {
  font-size: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0f2e9;
  padding: 9px;
  border-radius: 5px;
}
a {
  color: #426c49;
}
#detail .links {
  display: flex;
  gap: 14px;
  margin: 15px 0;
  font-size: 12px;
}
#detail label {
  justify-content: flex-start;
}
.review-note {
  width: 100%;
  height: 60px;
  font: 12px sans-serif;
}
#message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #263d2b;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  max-width: 80%;
}
.empty {
  padding: 20px;
  color: #7c8878;
  font-size: 13px;
}

.query-row {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #d6dcd1;
  border-radius: 7px;
  min-width: 0;
  background: #fffefb;
}
.predicate-search {
  padding: 0;
  border: none;
  border-radius: 14px;
  background: #fffefb;
  box-shadow: 0 2px 6px #263c2510;
}
#predicate-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.predicate-pill {
  display: flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid #cad8c0;
  border-radius: 10px;
  background: #edf3e7;
  overflow: hidden;
}
.predicate-pill.selected {
  background: #e3ebdd;
}
.predicate-pill.inactive {
  background: #f0f0eb;
  border-style: dashed;
}
.predicate-pill button {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #365942;
}
.predicate-pill .predicate-edit {
  flex: 1;
  min-width: 0;
  padding: 8px 6px 8px 11px;
  font-size: 11px;
  text-align: left;
  line-height: 1.4;
}
.predicate-pill.inactive .predicate-edit {
  color: #6c7368;
  text-decoration: line-through;
}
.predicate-pill .predicate-toggle,
.predicate-pill .predicate-mode,
.predicate-pill .predicate-remove {
  flex: 0 0 30px;
  padding: 7px 5px;
  display: grid;
  place-items: center;
}
.predicate-pill button:hover {
  background: #36594215;
}
.predicate-pill .predicate-remove:hover {
  background: #a3463020;
}
.predicate-pill button:focus-visible {
  outline: 2px solid #365942;
  outline-offset: -3px;
}
.predicate-search #add-criterion {
  width: auto;
  margin-top: 8px;
  padding: 7px 10px;
  font-size: 12px;
}
.query-row legend {
  font-size: 11px;
  color: #738075;
  padding: 0 5px;
}
.row-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}
.row-heading strong {
  font-size: 12px;
  line-height: 1.5;
}
.secondary {
  background: #e8eee2;
  color: #365942;
}
.remove-criterion {
  padding: 2px 8px;
  font-size: 20px;
}
.query-row label {
  flex-wrap: wrap;
  gap: 5px;
}
.query-row select {
  max-width: 100%;
  font-size: 12px;
}
.query-row input[type='number'] {
  width: 100px;
}
input[type='checkbox'] {
  width: auto;
  accent-color: #365942;
}
.query-row .hint {
  margin-bottom: 4px;
}
.coverage-note,
#query-state {
  font-size: 11px;
  color: #63794c;
}
#query-state {
  margin-top: 12px;
}
#add-criterion {
  width: 100%;
}
#poi-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
}
#poi-types label {
  justify-content: flex-start;
  margin: 5px 0;
  font-size: 11px;
}
.poi-marker {
  filter: drop-shadow(0 1px 2px #26392f55);
}
.poi-cluster {
  position: relative;
  background: none;
  border: none;
}
.poi-cluster img {
  width: 100%;
  height: 100%;
}
.poi-cluster span {
  position: absolute;
  right: -9px;
  top: -6px;
  min-width: 19px;
  padding: 2px 4px;
  border-radius: 10px;
  background: #fffef9;
  color: #26392f;
  border: 1px solid #738075;
  text-align: center;
  font:
    600 11px system-ui,
    sans-serif;
}

.criterion-ranking {
  border-top: 1px solid #dddcd0;
  margin-top: 12px;
  padding-top: 4px;
}
.criterion-ranking input[type='range'] {
  width: 140px;
  accent-color: #24766a;
}
.criterion-ranking output {
  font-variant-numeric: tabular-nums;
}
#ranking-legend {
  position: absolute;
  left: 12px;
  bottom: 90px;
  z-index: 450;
  width: 260px;
  padding: 12px;
  border-radius: 8px;
  background: #fffef9ee;
  box-shadow: 0 2px 8px #26392f22;
  font-size: 12px;
}
#ranking-legend[hidden] {
  display: none;
}
.ranking-gradient {
  height: 10px;
  margin: 8px 0 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #f5c518, #a6be22, #399139, #005830);
}
.ranking-scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ranking-breakdown {
  padding-left: 18px;
}
.ranking-breakdown li {
  margin: 8px 0;
}

#ranking-legend label {
  display: block;
  margin: 0 0 10px;
}
#color-by {
  display: block;
  width: 100%;
  margin-top: 5px;
  font-size: 12px;
}
#color-title {
  display: block;
  line-height: 1.4;
}
#color-hint {
  margin: 8px 0;
  line-height: 1.4;
}
.ranking-tooltip {
  white-space: normal;
  width: min(300px, calc(100vw - 40px));
}
.sample-tooltip ul {
  margin: 8px 0;
  padding-left: 16px;
}
.sample-tooltip li {
  margin: 6px 0;
  line-height: 1.4;
}

.walking-route {
  border-left: 3px solid #63886a;
  padding-left: 10px;
  margin: 14px 0;
}

#cluster-controls label {
  display: block;
  margin-bottom: 6px;
}
#cluster-gap {
  width: 100%;
}
/* The map is the workspace; controls are independent floating surfaces. */
:root {
  --query-bottom: 104px;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
main,
.map-wrap {
  position: fixed;
  inset: 0;
}
#map {
  width: 100%;
  height: 100%;
  background: #e5e9df;
  isolation: isolate;
}
.query-top,
.results-panel,
.map-settings-content,
#ranking-legend {
  background: #fffef9f2;
  border: 1px solid #dce2d5;
  box-shadow: 0 8px 30px #26392f22;
  backdrop-filter: blur(12px);
}
.query-top {
  --query-icon-inset: 14px;
  --query-content-inset: 2px;
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 800;
  padding: 10px 12px 8px;
  border-radius: 16px;
}
.query-top form {
  margin: 0;
}
@media (min-width: 1200px) {
  .query-top {
    max-width: 960px;
    margin-inline: auto;
  }
}
.query-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.query-bar button {
  white-space: nowrap;
  font-size: 12px;
}
#query-summary {
  flex: 1;
  min-width: 0;
  text-align: left;
  text-overflow: ellipsis;
  overflow: hidden;
  background: transparent;
  color: #365942;
  padding: 12px var(--query-icon-inset);
}

#collapse-query {
  background: transparent;
  color: #536b52;
}
#evaluate {
  width: auto;
  margin: 0;
}
.search-area-actions {
  display: flex;
  gap: 6px;
}
.search-area-actions button {
  background: #f2efe5;
  color: #4f614b;
}
.search-area-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}
.query-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}
.query-footer .hint,
.query-footer #query-state {
  font-size: 10px;
  margin: 7px 0 0;
}
#query-expanded {
  overflow: visible;
  padding: 22px var(--query-content-inset) 2px;
}
[hidden] {
  display: none !important;
}
.query-instructions {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.query-top .predicate-search {
  display: block;
  padding: calc(var(--query-icon-inset) - var(--query-content-inset));
  box-sizing: border-box;
  box-shadow: none;
}
.query-top #predicate-pills {
  flex: 1;
  min-width: 0;
}
.query-top .predicate-pill {
  min-width: 0;
  max-width: none;
}
.query-top #add-criterion {
  flex-shrink: 0;
  margin: 0;
  width: auto;
}
.query-top #criteria .query-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 18px;
  padding: 12px 16px;
  margin: 10px 0 0;
}
.query-top .row-heading,
.query-top .query-row > .hint,
.query-top .coverage-note,
.query-top .criterion-ranking {
  grid-column: 1 / -1;
}
.query-top .query-row label {
  margin: 0;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}
.query-top .query-row select {
  width: 100%;
}
.query-top .criterion-ranking {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.query-top .criterion-ranking label {
  flex-direction: row;
  align-items: center;
}
.query-top .query-row .hint,
.query-top .coverage-note {
  margin: 0;
}
.query-tools {
  margin-top: 10px;
}
.query-tools details {
  margin: 0;
}
.query-settings {
  font-size: 11px;
}
.query-settings[open] {
  max-width: 650px;
}
.results-panel {
  position: fixed;
  z-index: 600;
  top: calc(var(--query-bottom) + 14px);
  bottom: 112px;
  left: 16px;
  width: 340px;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.list-heading {
  gap: 6px;
  flex-wrap: wrap;
}
.list-heading h2 {
  flex: 1;
  margin: 0;
  font-size: 15px;
}
.list-heading select {
  max-width: 110px;
  font-size: 11px;
}
#refresh-results {
  font-size: 11px;
  padding: 7px;
}
#toggle-results {
  background: transparent;
  color: #536b52;
  font-size: 20px;
  padding: 0 6px;
}
#results-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
#cluster-info {
  margin: 10px 0;
  font-size: 10px;
  line-height: 1.5;
}
.cluster-options {
  font-size: 11px;
  margin-bottom: 12px;
}
#cluster-controls label {
  margin: 10px 0 5px;
}
#cluster-gap {
  width: 90px;
}
#list {
  flex: 1;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.street {
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.street strong {
  font-size: 13px;
}
.street small {
  font-size: 11px;
  margin-top: 6px;
}
.results-panel.collapsed {
  bottom: auto;
}
.results-panel.collapsed #results-body,
.results-panel.collapsed #status,
.results-panel.collapsed #refresh-results {
  display: none;
}
.map-settings {
  flex: 0 0 auto;
  font-size: 12px;
}
.map-settings > summary {
  padding: 10px;
  border-radius: 8px;
  background: #edf2e7;
  list-style: none;
}
.map-settings > summary::-webkit-details-marker {
  display: none;
}
.map-settings-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-height: 65dvh;
  overflow: auto;
  border-radius: 14px;
  padding: 16px;
}
.map-settings-content .stats {
  margin: 8px 0 14px;
  padding: 10px;
  font-size: 11px;
}
.map-settings-content .stats strong {
  font-size: 13px;
}
.map-settings-content .profile {
  padding: 10px;
  margin-bottom: 12px;
}
#blend-controls {
  position: static;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
#ranking-legend {
  left: auto;
  right: 16px;
  bottom: 106px;
  width: 260px;
  border-radius: 12px;
}
#ranking-legend:not([open]) {
  width: auto;
  padding: 10px 14px;
}
#ranking-legend > summary {
  font-size: 12px;
}
#ranking-legend[open] > summary {
  margin-bottom: 12px;
}
#map-info {
  left: 16px;
  right: auto;
  bottom: 60px;
  max-width: calc(100% - 90px);
  padding: 9px 12px;
  background: #fffefaeb;
}
#detail {
  top: calc(var(--query-bottom) + 14px);
  max-height: calc(100dvh - var(--query-bottom) - 90px);
}
.leaflet-control-zoom {
  margin-right: 16px !important;
  margin-bottom: 28px !important;
  border-radius: 8px !important;
  overflow: hidden;
}
@media (max-width: 1000px) {
  .query-bar {
    flex-wrap: wrap;
  }
  #query-summary {
    flex-basis: 55%;
  }
  .query-footer #query-state {
    max-width: 30%;
    text-align: right;
  }
}
@media (max-width: 700px) {
  .query-top {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 8px;
  }
  #query-summary {
    flex-basis: calc(100% - 110px);
  }
  .query-bar {
    gap: 6px;
  }
  .query-bar button {
    font-size: 11px;
    padding: 9px;
  }
  .query-footer {
    display: block;
  }
  .query-footer #query-state {
    max-width: 100%;
    text-align: left;
  }
  .query-top .predicate-search {
    flex-wrap: wrap;
  }
  .query-top #predicate-pills {
    grid-template-columns: minmax(0, 1fr);
    flex-basis: 100%;
  }
  .query-top #criteria .query-row {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .results-panel {
    top: auto;
    bottom: 112px;
    left: 10px;
    width: min(340px, calc(100% - 78px));
    max-height: 40dvh;
  }
  .results-panel.collapsed {
    bottom: 112px;
  }
  .map-settings-content {
    width: min(320px, calc(100vw - 20px));
  }
  #ranking-legend {
    right: 10px;
    top: calc(var(--query-bottom) + 12px);
    bottom: auto;
  }
  #ranking-legend[open] {
    width: min(260px, calc(100% - 20px));
    z-index: 650;
    max-height: 50dvh;
    overflow: auto;
  }
  #detail {
    right: 10px;
    width: calc(100% - 20px);
    padding: 16px;
    z-index: 750;
  }
  #map-info {
    left: 10px;
    bottom: 60px;
    font-size: 10px;
    max-height: 38px;
    overflow: auto;
  }
}
.result-hover-halo {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px #244b38ee) drop-shadow(0 0 10px #ffdb49ee);
  stroke-linejoin: round;
  stroke-linecap: round;
}

.realtor-link {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  width: fit-content;
  color: #ba1835;
  font-size: 12px;
  font-weight: 600;
}
.street.active .realtor-link {
  display: inline-flex;
}
.realtor-link[aria-busy='true'] {
  opacity: 0.5;
}
.street[role='button'] {
  cursor: pointer;
}

.cluster-selection {
  position: fixed;
  right: 16px;
  top: calc(var(--query-bottom) + 12px);
  z-index: 640;
  width: 280px;
  max-height: 45dvh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #dce3d6;
  border-radius: 12px;
  background: #fffefbf5;
  box-shadow: 0 5px 24px #263c2926;
}
.cluster-selection[hidden] {
  display: none;
}
.selection-heading,
.selection-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.selection-heading {
  font-size: 13px;
}
.selection-heading button,
.selection-tile button {
  background: transparent;
  border: 0;
  padding: 3px 7px;
  color: #68766a;
  font-size: 20px;
}
.selection-hint {
  display: block;
  color: #748073;
  font-size: 10px;
  margin-bottom: 8px;
}
.selection-tile {
  flex-wrap: wrap;
  user-select: none;
  -webkit-user-select: none;
  border-top: 1px solid #e4e8df;
  padding: 9px 0;
}
.brand-picker {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 520px;
}
.brand-autocomplete {
  position: relative;
}
.brand-search {
  width: 100%;
  color: #263b2b;
}
.brand-picker label small {
  color: #748073;
  font-weight: normal;
}
.brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0;
}
.brand-chips button {
  color: #365942;
  border: 1px solid #cbd8c9;
  background: #edf4e9;
  border-radius: 16px;
  padding: 4px 10px;
}
.brand-options {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #cbd8c9;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px #263c2926;
}
.brand-options button {
  color: #263b2b;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 10px;
  text-align: left;
}
.brand-options button:hover,
.brand-options button[aria-selected='true'] {
  background: #edf4e9;
}
.brand-status {
  display: block;
  margin-top: 5px;
  color: #748073;
}
.selection-tile strong {
  font-size: 13px;
}
.selection-tile small {
  display: block;
  font-size: 11px;
  color: #748073;
  margin-top: 3px;
}
.selection-tile .realtor-link {
  display: inline-flex;
  margin-top: 0;
}
@media (max-width: 700px) {
  .cluster-selection {
    right: 10px;
    width: min(260px, calc(100vw - 20px));
    top: auto;
    bottom: 112px;
    max-height: 32dvh;
  }
}

.selected-cluster-outline {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.realtor-external-icon {
  flex-shrink: 0;
  text-decoration: none;
}

.census-block-display .leaflet-interactive {
  cursor: inherit;
}

.leaflet-control-scale {
  margin-left: 16px !important;
  margin-bottom: 18px !important;
}
.leaflet-control-scale-line {
  background: #fffefaeb;
  color: #283c29;
  border-color: #53624e;
}
.measuring-route,
.measuring-route .leaflet-interactive {
  cursor: crosshair !important;
}
.route-measure {
  position: fixed;
  z-index: 680;
  top: calc(var(--query-bottom) + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(330px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffefbf5;
  box-shadow: 0 5px 24px #263c2926;
}
.route-measure[hidden] {
  display: none;
}
.route-measure > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.route-measure > div button {
  padding: 2px 8px;
  color: #365c42;
  background: transparent;
}
.route-measure output {
  display: block;
  margin: 8px 0;
  color: #2459a5;
  font-weight: 600;
}
.route-measure small {
  display: block;
  font-size: 11px;
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  .leaflet-control-scale {
    margin-left: 10px !important;
  }
}

.overview-count {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #fffefa;
  background: #365c42b3;
  color: #fffefa;
  box-shadow: 0 2px 8px #20362955;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.overview-count:focus-visible {
  outline: 3px solid #2674db;
  outline-offset: 3px;
}
.overview-tile {
  width: 100%;
  text-align: left;
  color: #283c29;
}

.loading-pixels {
  pointer-events: none;
}
.geometry-loading-saturation {
  animation: loading-saturation-pulse 2.4s ease-in-out infinite;
}
@keyframes loading-saturation-pulse {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .geometry-loading-saturation {
    animation: none;
  }
}

.overview-count-hovered {
  border-color: #ffd76a;
  box-shadow:
    0 0 0 4px #ffd76abf,
    0 0 18px 8px #ffd76a99;
}

/* React query palette */
#query-controls {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.query-top #criteria .palette-editor {
  display: block;
}
.palette-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.palette-field {
  font-size: 12px;
  gap: 6px;
}
.query-top .palette-field input,
.query-top .palette-field select {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}
.palette-switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
.palette-switch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 34px;
  height: 20px;
  border-radius: 12px;
  border: 0;
  padding: 2px;
  flex-shrink: 0;
  background: #c3cbbb;
}
.palette-switch[data-state='checked'] {
  background: #365c42;
}
.palette-switch-thumb {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 120ms;
}
.palette-switch-thumb[data-state='checked'] {
  transform: translateX(14px);
}
.palette-slider {
  position: relative;
  display: flex;
  align-items: center;
  width: 140px;
  height: 24px;
  touch-action: none;
}
.palette-slider-track {
  height: 4px;
  background: #dce2d5;
  flex: 1;
  border-radius: 4px;
}
.palette-slider-range {
  position: absolute;
  height: 4px;
  background: #365c42;
  border-radius: 4px;
}
.palette-slider-thumb {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #365c42;
  border-radius: 50%;
  background: #fffefa;
}
.palette-tooltip,
.palette-menu {
  z-index: 1200;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: 0 5px 20px #26392f26;
}
.palette-tooltip {
  padding: 7px 10px;
  background: #26392f;
  color: #fffefa;
  max-width: 240px;
}
.palette-tooltip svg {
  fill: #26392f;
}
.palette-menu {
  background: #fffef9;
  border: 1px solid #dce2d5;
  min-width: 180px;
  padding: 5px;
}
.palette-menu-item {
  padding: 10px 12px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}
.palette-menu-item[data-highlighted] {
  background: #edf2e7;
  color: #365c42;
}
.palette-optional,
.palette-source {
  color: #758272;
  font-size: 11px;
}
.palette-optional {
  margin-left: 8px;
  font-weight: normal;
}
.palette-source {
  display: block;
  margin: 8px 0;
}
.palette-clear-ranking {
  background: transparent;
  color: #65725f;
  font-size: 11px;
  padding: 8px;
}
.palette-editor .brand-picker {
  margin: 12px 0;
}
.brand-options button small {
  display: block;
  color: #758272;
}
@media (max-width: 600px) {
  #query-controls {
    flex-wrap: wrap;
  }
  #query-summary {
    flex-basis: 100%;
  }
  .query-bar {
    align-items: flex-start;
  }
  .palette-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.brand-status {
  min-height: 1.3em;
}

/* Shared Heroicons sizing for React and legacy map controls. */
.ui-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
span.ui-icon {
  background-color: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
}
#query-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
#query-summary > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#add-criterion,
.brand-chips button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.leaflet-control-zoom a {
  display: flex;
  align-items: center;
  justify-content: center;
}
.realtor-link .realtor-external-icon {
  width: 16px;
  height: 16px;
}

/* Independent map tools control, anchored beside the zoom controls. */
.map-settings {
  position: fixed;
  z-index: 850;
  right: 64px;
  bottom: 24px;
}
.map-settings > summary {
  background: #fffef9f2;
  border: 1px solid #dce2d5;
  box-shadow: 0 4px 18px #26392f22;
  backdrop-filter: blur(12px);
}
.map-settings-content {
  top: auto;
  bottom: calc(100% + 10px);
  width: min(320px, calc(100vw - 96px));
  box-sizing: border-box;
}

.criterion-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.query-bar {
  position: relative;
  isolation: isolate;
}
.query-top.editing .query-bar::before {
  content: '';
  position: absolute;
  inset: -10px -12px -10px;
  z-index: -1;
  background: #365942;
  border-radius: 15px 15px 0 0;
  pointer-events: none;
}
@media (max-width: 700px) {
  .query-top.editing .query-bar::before {
    inset: -8px -8px -10px;
  }
}

.palette-add-row {
  padding: 0 9px;
  margin-top: 4px;
}
.palette-add-row #add-criterion {
  margin: 0;
  width: auto;
  font-size: 12px;
  padding: 7px 10px;
}

#query-controls {
  flex-wrap: nowrap;
}
#query-controls #query-summary {
  flex-basis: 0;
}
#query-controls #add-criterion {
  flex-shrink: 0;
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: #edf2e7;
}
.palette-bottom {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.palette-bottom #collapse-query {
  padding: 5px 18px;
}

.criterion-category {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #26392f;
}

button:focus:not(:focus-visible),
[role='button']:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible {
  outline: 2px solid #365942;
  outline-offset: 2px;
}

.query-top.editing #query-summary,
.query-top.editing #collapse-query {
  color: #fffefa;
}

.palette-distance {
  grid-column: span 2;
}
.palette-distance > span {
  display: block;
  margin-bottom: 6px;
}
.palette-distance-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.query-top .palette-distance-controls > select {
  width: 120px;
  flex-shrink: 0;
}
.query-top .palette-distance-controls > label {
  width: 85px;
  min-width: 60px;
}
.palette-distance-unit {
  white-space: nowrap;
  color: #65725f;
}
@media (max-width: 450px) {
  .query-top .palette-distance-controls > select {
    width: 110px;
  }
}

.criterion-summary {
  margin: 12px 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #52634f;
}
.palette-place-group {
  grid-column: span 2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.palette-place-group > label:first-child {
  flex: 1;
  min-width: 0;
}
.palette-place-group > label:last-child:not(:first-child) {
  width: 78px;
  flex: 0 0 78px;
}

.query-top #criteria .palette-editor {
  border: 1px solid #94ad8e;
  border-radius: 12px;
  background: #fffef9;
  box-shadow: 0 4px 16px #26392f14;
}
.palette-editor > .row-heading {
  margin: -12px -16px 0;
  padding: 12px 16px;
  background: #365942;
  color: #fffefa;
  border-radius: 11px 11px 0 0;
  border-bottom: 1px solid #365942;
}
.palette-editor .close-criterion {
  background: transparent;
}

.criterion-heading-text {
  min-width: 0;
}
.criterion-heading-text .criterion-summary {
  margin: 4px 0 0;
  font-size: 13px;
}

/* One compact color panel replaces the separate viewport status card and key. */
#ranking-legend,
#ranking-legend:not([open]),
#ranking-legend[open] {
  position: fixed;
  top: auto;
  left: 16px;
  right: auto;
  bottom: 68px;
  width: 300px;
  max-width: calc(100vw - 84px);
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  z-index: 650;
}
#ranking-legend > summary,
#ranking-legend[open] > summary {
  display: block;
  list-style: none;
  cursor: pointer;
  margin: 0;
}
#ranking-legend > summary::-webkit-details-marker {
  display: none;
}
.color-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#ranking-legend #color-title {
  font-size: 13px;
  font-weight: 600;
}
#ranking-legend #color-hint {
  margin: 4px 0 8px;
  font-size: 11px;
  color: #65725f;
}
#ranking-legend .ranking-gradient {
  margin: 0 0 5px;
  height: 7px;
}
#ranking-legend .ranking-scale {
  margin: 0;
  font-size: 11px;
}
.color-panel-chevron {
  width: 16px;
  height: 16px;
}
#ranking-legend[open] .color-panel-chevron {
  transform: rotate(180deg);
}
.color-panel-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dce2d5;
}
.color-panel-controls select {
  width: 100%;
}
.color-panel-controls small {
  color: #758272;
  font-size: 11px;
}
.map-settings-content #map-info {
  position: static;
  padding: 0;
  max-width: none;
  max-height: none;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
}
@media (max-width: 700px) {
  #ranking-legend,
  #ranking-legend:not([open]),
  #ranking-legend[open] {
    left: 10px;
  }
}

.palette-editor > .row-heading .criterion-category,
.palette-editor > .row-heading .criterion-summary,
.palette-editor > .row-heading .close-criterion {
  color: #fffefa;
}
.criterion-summary strong {
  font-size: inherit;
  font-weight: 600;
  color: inherit;
}
.query-top.editing #query-summary:focus-visible,
.query-top.editing #collapse-query:focus-visible,
.palette-editor .close-criterion:focus-visible {
  outline-color: #fffefa;
}
#query-controls #add-criterion {
  color: #365942;
}

/* Shared subject, threshold, and distance groups across criterion editors. */
.palette-field-group,
.palette-comparison {
  grid-column: span 2;
  min-width: 0;
}
.palette-field-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.palette-field-group > label {
  flex: 1;
  min-width: 0;
}
.palette-comparison > span {
  display: block;
  margin-bottom: 6px;
}
.palette-inline-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.query-top .palette-inline-controls > select {
  width: 120px;
  flex-shrink: 0;
}
.query-top .palette-inline-controls > label {
  min-width: 60px;
  flex: 1;
}
.query-top .palette-distance-controls > label {
  flex: 0 1 85px;
}
.palette-unit {
  white-space: nowrap;
  color: #65725f;
}
.palette-distance > .palette-switch-field {
  justify-content: flex-start;
  margin-bottom: 8px;
}
@media (max-width: 450px) {
  .query-top .palette-inline-controls > select {
    width: 110px;
  }
}
.query-top .palette-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .query-top .palette-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Labels sit below controls; label wrapping cannot move the input row. */
.query-top .query-row .palette-field {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 6px;
}
.query-top .palette-inline-controls > .palette-field {
  display: block;
}
.palette-comparison > span,
.palette-distance > span {
  margin-bottom: 0;
}
.palette-place-group,
.palette-field-group {
  align-items: flex-start;
}

.palette-fields {
  align-items: start;
}

.map-loading-toast {
  position: fixed;
  z-index: 700;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid #dce2d5;
  border-radius: 20px;
  background: #fffef9f2;
  color: #365942;
  box-shadow: 0 4px 18px #26392f20;
  backdrop-filter: blur(12px);
  pointer-events: none;
  font-size: 12px;
}
.map-loading-track {
  width: 32px;
  height: 10px;
  border-radius: 8px;
  background: #e3ebdd;
}
.map-loading-track > span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #365942;
  animation: map-loading-sway 1.3s ease-in-out infinite;
}
@keyframes map-loading-sway {
  0%,
  100% {
    transform: translateX(0) scale(0.8);
    opacity: 0.45;
  }
  50% {
    transform: translateX(22px) scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-loading-track > span {
    animation: none;
    transform: translateX(11px);
  }
}

.palette-rating {
  flex: 1;
  min-width: 0;
}
.palette-rating-slider {
  width: 100%;
  height: 38px;
}
.palette-rating-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}
.palette-rating-label output {
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}
.rating-clear {
  padding: 0;
  background: transparent;
  color: #758272;
  font-size: 11px;
}

.query-top.editing ~ .map-settings {
  top: calc(var(--query-bottom) + 10px);
  bottom: auto;
  right: 16px;
}
.query-top.editing ~ .map-settings .map-settings-content {
  top: calc(100% + 10px);
  bottom: auto;
}
@media (max-width: 700px) {
  .query-top.editing ~ .map-settings {
    right: 10px;
  }
}

.palette-distance-controls {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.palette-distance-optional > .palette-distance-field {
  margin-left: 18px;
}
.palette-distance-controls:disabled {
  opacity: 0.5;
}
.palette-distance-field > span {
  margin: 0;
}

/* Criteria expand inside their own grid cells; only one item is open. */
#predicate-pills {
  align-items: start;
}
.criterion-item {
  min-width: 0;
}
.criterion-accordion-heading {
  margin: 0;
  flex: 1;
  min-width: 0;
  font: inherit;
}
.predicate-pill .predicate-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.predicate-edit > span:first-child,
.predicate-edit > .criterion-heading-text {
  flex: 1;
  min-width: 0;
}
.predicate-pill .criterion-chevron {
  width: 16px;
  height: 16px;
}
.predicate-pill .predicate-toggle.palette-switch {
  flex: 0 0 34px;
  width: 34px;
  height: 20px;
  padding: 2px;
  margin: 0 6px;
  border-radius: 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background: #c3cbbb;
}
.predicate-pill .predicate-toggle.palette-switch[data-state='checked'] {
  background: #365942;
}
.criterion-item[data-state='open'] > .predicate-pill {
  background: #365942;
  border-color: #365942;
  border-radius: 10px 10px 0 0;
  align-items: flex-start;
  padding-top: 8px;
}
.criterion-item[data-state='open'] .predicate-edit,
.criterion-item[data-state='open'] .criterion-category,
.criterion-item[data-state='open'] .criterion-summary,
.criterion-item[data-state='open'] .predicate-remove {
  color: #fffefa;
}
.criterion-item[data-state='open']
  .predicate-toggle.palette-switch[data-state='checked'] {
  background: #8da984;
}
.criterion-item[data-state='open'] .predicate-edit {
  align-items: flex-start;
  padding-bottom: 12px;
}
.criterion-item[data-state='open'] .predicate-edit > .criterion-chevron {
  margin-top: 5px;
}
.criterion-item.inactive[data-state='open'] .predicate-edit {
  text-decoration: none;
}
.query-top .criterion-item .palette-editor.embedded-editor {
  margin: 0;
  border: 1px solid #94ad8e;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 12px 16px;
  box-shadow: none;
  display: block;
}
.query-top .criterion-item .palette-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.criterion-accordion-content {
  min-width: 0;
}
.criterion-item[data-state='open'] .predicate-edit:focus-visible {
  outline-color: #fffefa;
}
/* Right-hand actions keep the same anchor through expansion. */
.criterion-item > .predicate-pill,
.criterion-item[data-state='open'] > .predicate-pill {
  align-items: flex-start;
  padding: 10px 0;
}
.criterion-item .predicate-pill .predicate-edit,
.criterion-item[data-state='open'] .predicate-edit {
  padding: 0 10px;
  line-height: 20px;
}
.criterion-item .predicate-pill .predicate-remove {
  width: 30px;
  height: 20px;
  flex: 0 0 30px;
  padding: 1px 5px;
}
.criterion-actions {
  gap: 8px;
}

.criterion-heading-text,
.criterion-heading-text .criterion-summary {
  display: block;
}

/* Match label insets to the text inside input and select controls. */
.query-top .palette-field select {
  padding-left: 7px;
}
.palette-field-label,
.palette-comparison > span,
.palette-distance-field > span {
  padding-left: 8px;
}
.query-top .palette-field > .palette-field-label {
  display: block;
}

.palette-distance-optional {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}
.palette-distance-optional > .palette-switch-field {
  justify-content: flex-end;
}
.palette-distance-optional > .palette-distance-field {
  width: max-content;
  max-width: calc(100% - 18px);
  margin-left: 18px;
}

/* Keep the palette header visible while its criteria scroll on short screens. */
.query-top {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
}
.query-top .query-bar {
  flex-shrink: 0;
}
.query-top #profile-form,
#query-palette {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
#query-expanded {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
@media (max-width: 700px) {
  .query-top {
    max-height: calc(100dvh - 20px);
  }
}

.criterion-item[data-state='closed'] .predicate-edit > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hover targets fill the pill; spacing belongs inside each target. */
.criterion-item > .predicate-pill,
.criterion-item[data-state='open'] > .predicate-pill {
  padding: 0;
  align-items: stretch;
}
.criterion-accordion-heading {
  display: flex;
}
.criterion-item .predicate-pill .predicate-edit,
.criterion-item[data-state='open'] .predicate-edit {
  padding: 10px;
}
.criterion-item .predicate-toggle.palette-switch {
  align-self: flex-start;
  margin: 10px 6px;
}
.criterion-item .predicate-pill .predicate-remove {
  height: auto;
  align-self: stretch;
  align-items: start;
  padding: 11px 5px;
}

.comparison-between > .palette-inline-controls {
  flex-wrap: nowrap;
  align-items: center;
}
.comparison-range-inputs {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid #cdd6ca;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.range-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}
.range-price-row + .range-price-row {
  border-top: 1px solid #e0e5db;
}
.range-price-bound {
  width: 28px;
  flex-shrink: 0;
  font-size: 11px;
  color: #758272;
}
.query-top .range-price-row > label {
  display: block;
  flex: 1;
  min-width: 0;
}
.query-top .range-price-row input {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 38px;
  padding-left: 0;
  padding-right: 0;
}
.comparison-range-inputs:focus-within {
  border-color: #365942;
}

input[type='number'] {
  text-align: right;
}

/* Numeric fields share inset captions and units; comparisons label their selector. */
.query-top .query-row .palette-number-field {
  display: block;
  min-width: 0;
}
.number-field-box {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #cdd6ca;
  border-radius: 5px;
  background: #fff;
}
.number-field-caption,
.number-field-unit {
  flex-shrink: 0;
  color: #758272;
  font-size: 11px;
  white-space: nowrap;
}
.query-top .query-row .number-field-box input {
  flex: 1;
  width: 0;
  min-width: 0;
  min-height: 38px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
}
.number-field-box:focus-within {
  border-color: #365942;
}
.query-top .palette-comparison > .palette-inline-controls {
  align-items: flex-start;
  flex-wrap: nowrap;
}
.query-top .query-row .comparison-operator {
  display: flex;
  flex-direction: column-reverse;
  flex: 0 0 120px;
  min-width: 0;
}
.query-top .query-row .palette-comparison .palette-number-field {
  flex: 1;
}
.comparison-range-inputs > .palette-number-field + .palette-number-field {
  border-top: 1px solid #e0e5db;
}
.number-field-joined .number-field-box {
  border: 0;
  border-radius: 0;
}
.query-top .palette-distance-controls > .palette-number-field {
  width: 140px;
  flex: 0 1 140px;
  min-width: 85px;
}
@media (max-width: 450px) {
  .query-top .query-row .comparison-operator {
    flex-basis: 110px;
  }
}

.palette-empty {
  margin: 8px 0 16px;
  padding: 14px 10px;
  color: #65725f;
  font-size: 13px;
  text-align: center;
}

.starter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.starter-intro {
  margin: 0 0 20px;
}
.starter-intro h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #365942;
}
.starter-intro p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #596850;
}
.query-top .starter-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d5dfcf;
  border-radius: 10px;
  background: #f0f5ec;
  color: #365942;
  text-align: left;
  white-space: normal;
  height: 100%;
}
.query-top .starter-tile:hover:not(:disabled) {
  background: #e3eddc;
  border-color: #8ca383;
}
.starter-tile strong {
  font-size: 14px;
}
.starter-tile span {
  font-size: 13px;
  line-height: 1.5;
  color: #596850;
}
.starter-queries .palette-empty {
  margin: 0;
  padding: 12px 0 4px;
}

.palette-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}
.palette-footer #clear-query {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
}

.palette-footer {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.palette-footer #clear-query {
  margin-left: auto;
}
.palette-account {
  min-width: 0;
  flex: 1;
  color: #596850;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.account-summary,
.account-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-form {
  margin-top: 10px;
}
.account-summary {
  margin-top: auto;
}
.account-form input {
  min-width: 0;
  flex: 0 1 280px;
  width: 280px;
  max-width: 100%;
  box-sizing: border-box;
}
.account-message {
  margin: 8px 0 0;
}

.criterion-upgrade {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #edf3e7;
  color: #365942;
  font-size: 13px;
  line-height: 1.5;
  animation: criterion-upgrade-in 160ms ease-out;
}
@keyframes criterion-upgrade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .criterion-upgrade {
    animation: none;
  }
}

.account-sign-out {
  color: #365942;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.account-sign-out[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
}

.save-query {
  padding: 12px 0 0;
}
.save-query-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.save-query-row input {
  min-width: 0;
  width: auto;
  flex: 1;
  box-sizing: border-box;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}
.save-query-row button {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13px;
}
.saved-query-list {
  margin-bottom: 20px;
}
.saved-query-list h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #365942;
}
.saved-query-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.saved-query-list li {
  min-width: 0;
}
.saved-query-list .starter-tile {
  width: 100%;
  overflow-wrap: anywhere;
}
.saved-query-list p {
  margin: 8px 0;
  font-size: 13px;
  color: #596850;
}
.starter-add-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.starter-add-hint .ui-icon {
  width: 14px;
  height: 14px;
}
.palette-place-choice {
  flex: 1;
  min-width: 0;
}
.palette-place-choice > .palette-field {
  width: 100%;
}
.palette-playground-option {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}
.palette-playground-option .palette-switch-field {
  gap: 10px;
}
.palette-playground-option label {
  margin: 0;
}

.place-jump {
  position: fixed;
  top: calc(var(--query-bottom) + 10px);
  left: max(16px, calc((100vw - 960px) / 2));
  max-width: calc(100vw - 32px);
  z-index: 810;
}
#place-jump-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(400px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid #dce2d5;
  border-radius: 10px;
  background: #fffef9f2;
  color: #365942;
  box-shadow: 0 4px 18px #26392f22;
  backdrop-filter: blur(12px);
  font-size: 13px;
}
#place-jump-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-jump-panel {
  width: min(360px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid #dce2d5;
  border-radius: 10px;
  background: #fffef9;
  box-shadow: 0 8px 30px #26392f33;
}
.place-jump-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 6px;
  color: #365942;
}
.place-jump-input input {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 7px 0;
  font: inherit;
  font-size: 13px;
  border: 0;
  background: transparent;
}
.place-jump-input input:focus,
.place-jump-input input:focus-visible {
  outline: none;
  box-shadow: none;
}
.place-jump-input button {
  display: flex;
  padding: 6px;
  background: transparent;
  color: #65725f;
}
.place-jump-panel ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  max-height: 35vh;
  overflow-y: auto;
}
.place-jump-panel ul:empty {
  margin: 0;
}
.place-jump-panel li {
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  color: #365942;
  font-size: 13px;
}
.place-jump-panel li[aria-selected='true'] {
  background: #edf3e7;
}
.place-jump-panel strong {
  display: block;
  font-weight: 500;
}
.place-jump-panel small {
  display: block;
  color: #65725f;
  margin-top: 2px;
}
.place-jump-panel p {
  margin: 8px 10px;
  font-size: 12px;
  color: #65725f;
}
@media (max-width: 700px) {
  .place-jump {
    left: 10px;
    max-width: calc(100vw - 20px);
  }
}

.place-jump-panel:focus-within .place-jump-input {
  margin: -6px -6px 0;
  padding: 6px 6px 6px 12px;
  border-radius: 9px 9px 0 0;
  background: #365942;
  color: #fffefa;
}
.place-jump-panel:focus-within .place-jump-input input,
.place-jump-panel:focus-within .place-jump-input button {
  color: #fffefa;
}
.place-jump-panel:focus-within .place-jump-input input::placeholder {
  color: #fffefacc;
}

.place-jump-input input::selection {
  background: #dce8d5;
  color: #26392f;
}

.account-saved-queries {
  margin-top: 8px;
}
.saved-query-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf3e7;
  color: #365942;
  font-size: 12px;
  line-height: 18px;
}
.saved-query-trigger:hover,
.saved-query-trigger[data-state='open'] {
  background: #e1ebda;
}
.saved-query-trigger .ui-icon {
  width: 14px;
  height: 14px;
}
.saved-query-menu {
  max-height: min(360px, 50vh);
  overflow-y: auto;
}
.saved-query-menu-status {
  padding: 8px 10px;
  font-size: 12px;
  color: #596850;
}
.save-query-row {
  flex-wrap: wrap;
}
.save-query-row input {
  flex-basis: 220px;
}
@media (max-width: 700px) {
  .save-query-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }
  .save-query-row input {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }
  .save-query-row button {
    grid-column: 2;
    grid-row: 1;
  }
  .save-query-row button.secondary {
    grid-row: 2;
  }
}
.color-weights {
  display: grid;
  gap: 12px;
  width: 100%;
}
.color-weight-label,
.color-weight-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.color-weight-label {
  font-size: 12px;
}
.color-importance {
  font-variant-numeric: tabular-nums;
  color: #596850;
}
.color-weight .palette-slider {
  width: 100%;
}
.color-weight-footer small {
  color: #596850;
  font-size: 11px;
}
.color-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #edf2e7;
  color: #365c42;
  font-size: 11px;
}
.color-reset .ui-icon {
  width: 14px;
  height: 14px;
}

.color-panel-controls {
  max-height: min(55vh, 480px);
  overflow-y: auto;
}
.place-location-bar {
  display: flex;
  align-items: stretch;
  width: min(460px, calc(100vw - 32px));
  border: 1px solid #dce2d5;
  border-radius: 10px;
  background: #fffef9f2;
  color: #365942;
  box-shadow: 0 4px 18px #26392f22;
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.place-location-bar #place-jump-toggle {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  backdrop-filter: none;
}
.place-location-bar .place-tab,
.place-location-bar .place-bookmark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  padding: 10px;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.place-location-bar .place-tab {
  border-right: 1px solid #dce2d5;
}
.place-location-bar .place-bookmark {
  border-left: 1px solid #dce2d5;
}
.place-location-bar .place-bookmark.is-bookmarked,
.place-location-bar .place-tab[aria-pressed='true'],
.place-location-bar .place-jump-input {
  background: #365c42;
  color: #fffef9;
}
.place-location-bar .place-jump-input {
  min-width: 0;
  flex: 1;
  padding-left: 10px;
}
.place-location-bar .place-jump-input input,
.place-location-bar .place-jump-input button {
  color: inherit;
}
.place-location-bar .place-jump-input input::placeholder {
  color: inherit;
  opacity: 0.8;
}
.place-jump-panel {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 32px));
  margin-top: 4px;
  max-height: min(55vh, 460px);
  overflow-y: auto;
}
.place-jump-panel .bookmark-list {
  margin: 0;
  padding: 0;
}
.place-jump-panel .bookmark-list li {
  display: flex;
  align-items: stretch;
  padding: 0;
}
.bookmark-place {
  flex: 1;
  min-width: 0;
  padding: 10px;
  text-align: left;
  background: transparent;
  color: #365942;
  border-radius: 6px 0 0 6px;
}
.bookmark-place strong {
  display: block;
  white-space: normal;
}
.bookmark-place small {
  display: block;
  margin-top: 4px;
}
.bookmark-trash {
  flex: 0 0 38px;
  padding: 8px;
  background: transparent;
  color: #596850;
  border-radius: 0 6px 6px 0;
}
.bookmark-place:hover,
.bookmark-trash:hover {
  background: #e8eedf;
}
.bookmark-place[aria-current='location'] {
  background: #edf2e7;
}
.bookmark-error {
  margin: 4px 0 0;
  padding: 8px 10px;
  background: #fffef9;
  border-radius: 8px;
  color: #365942;
  font-size: 12px;
}
@media (max-width: 700px) {
  .place-location-bar,
  .place-jump-panel {
    width: min(460px, calc(100vw - 20px));
  }
}
