.sa-map-intro {
  margin-bottom: .75rem;
}

.sa-directory-tools {
  margin: 1.25rem 0 2rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #b8c7cc;
  border-radius: .6rem;
  background: #f5f8f9;
}

.sa-directory-tools h2 {
  margin-top: 0;
}

.sa-directory-filter-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 1.5fr) minmax(11rem, 1fr) minmax(11rem, 1fr);
  gap: 1rem;
  align-items: end;
}

.sa-directory-filter-grid p {
  margin: 0;
}

.sa-directory-filter label {
  display: block;
  margin-bottom: .35rem;
  color: #173d4c;
  font-weight: 800;
}

.sa-directory-filter input,
.sa-directory-filter select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: .65rem .7rem;
  border: 2px solid #506b75;
  border-radius: .35rem;
  background: #fff;
  color: #17252d;
  font: inherit;
}

.sa-directory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
  margin: 1rem 0 0;
}

.sa-directory-actions button {
  min-height: 48px;
  padding: .65rem 1rem;
  border: 2px solid #173d4c;
  border-radius: .35rem;
  background: #173d4c;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sa-directory-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.sa-directory-filter input:focus-visible,
.sa-directory-filter select:focus-visible,
.sa-directory-actions button:focus-visible,
.sa-directory-actions a:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-directory-place {
  margin: -.35rem 0 .65rem;
  color: #334f5a;
  font-size: .95rem;
  font-weight: 700;
}

.sa-map-frame {
  position: relative;
}

.sa-place-map-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
  margin: 1.15rem 0 1.35rem;
  padding: .85rem;
  border: 2px solid #506b75;
  border-left: .45rem solid #173d4c;
  border-radius: .55rem;
  background: #f5f8f9;
  color: #17252d;
}

.sa-place-map-open {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .65rem 1rem;
  border: 2px solid #173d4c;
  border-radius: .4rem;
  background: #173d4c;
  color: #fff;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.sa-place-map-open:hover,
.sa-place-map-open:focus-visible {
  background: #fff;
  color: #173d4c;
  text-decoration: none;
}

.sa-place-map-open:focus-visible {
  outline: 3px solid #f6c453;
  outline-offset: 3px;
}

.sa-place-map-entry-note {
  margin: 0;
  color: #334f5a;
  font-size: .96rem;
  line-height: 1.5;
}

.sa-map-skip {
  font-weight: 750;
}

.sa-record-grid:focus {
  outline: 3px solid #173d4c;
  outline-offset: 4px;
}

.sa-record-grid {
  scroll-margin-top: 2rem;
}

.sa-place-search {
  display: grid;
  gap: .35rem;
  margin: 0 0 .85rem;
}

.sa-place-search > label {
  color: #173d4c;
  font-weight: 800;
}

.sa-place-search-controls {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: .5rem;
}

.sa-place-search input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: .6rem .7rem;
  border: 2px solid #506b75;
  border-radius: .35rem;
  background: #fff;
  color: #17252d;
  font: inherit;
}

.sa-place-search-button {
  min-height: 44px;
  padding: .65rem .9rem;
  border: 2px solid #173d4c;
  border-radius: .35rem;
  background: #173d4c;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sa-place-search input:focus-visible,
.sa-place-search-button:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-place-search-status {
  min-height: 1.5em;
  color: #334f5a;
}

.sa-place-search-status:empty {
  display: none;
}

.sa-gazetteer-results {
  margin-top: .15rem;
  padding: .65rem;
  border: 1px solid #9eb0b6;
  border-radius: .4rem;
  background: #f4f8f7;
}

.sa-gazetteer-results-heading {
  margin: 0 0 .4rem;
  color: #173d4c;
  font-weight: 800;
}

.sa-gazetteer-results ul {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sa-gazetteer-result {
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 2px solid #506b75;
  border-radius: .35rem;
  background: #fff;
  color: #17252d;
  font: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.sa-gazetteer-result strong,
.sa-gazetteer-result span {
  display: block;
}

.sa-gazetteer-result span {
  color: #3c555f;
  font-size: .9rem;
}

.sa-gazetteer-result:hover {
  border-color: #173d4c;
  background: #eaf3f0;
}

.sa-gazetteer-result:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-location-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: .85rem;
}

.sa-map-zoom-hint {
  margin: -.15rem 0 .65rem;
  color: #334f5a;
  font-size: .94rem;
}

.sa-map .leaflet-control-zoom a {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  color: #173d4c;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 42px;
}

.sa-map .leaflet-control-zoom a:hover,
.sa-map .leaflet-control-zoom a:focus-visible {
  background: #173d4c;
  color: #fff;
}

.sa-map .leaflet-control-zoom a:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.sa-nls-toggle {
  min-height: 44px;
  padding: .65rem .9rem;
  border: 2px solid #173d4c;
  border-radius: .35rem;
  background: #fff;
  color: #173d4c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sa-nls-toggle:hover,
.sa-nls-toggle:focus-visible {
  background: #173d4c;
  color: #fff;
}

.sa-nls-toggle:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.sa-nls-toggle[aria-pressed="true"] {
  background: #173d4c;
  color: #fff;
}

.sa-records-toggle[aria-pressed="true"],
.sa-hes-toggle[aria-pressed="true"],
.sa-sm-toggle[aria-pressed="true"],
.sa-wikipedia-toggle[aria-pressed="true"] {
  background: #173d4c;
  color: #fff;
}

.sa-location-button,
.sa-location-clear,
.sa-records-toggle,
.sa-hes-toggle,
.sa-sm-toggle,
.sa-wikipedia-toggle,
.sa-hes-filter-toggle,
.sa-route-toggle,
.sa-map-expand,
.sa-map-close,
.sa-map-controls-toggle,
.sa-map-search-toggle,
.sa-hes-filter-reset,
.sa-hes-filter-apply,
.sa-hes-filter-cancel,
.sa-hes-summary-edit,
.sa-hes-summary-clear,
.sa-route-print,
.sa-route-clear,
.sa-route-close,
.sa-route-generate,
.sa-route-minimise,
.sa-route-stop-actions button,
.sa-route-open {
  min-height: 44px;
  padding: .65rem .9rem;
  border: 2px solid #173d4c;
  border-radius: .35rem;
  background: #173d4c;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sa-location-clear,
.sa-records-toggle,
.sa-hes-toggle,
.sa-sm-toggle,
.sa-wikipedia-toggle,
.sa-hes-filter-toggle,
.sa-route-toggle,
.sa-map-expand,
.sa-map-controls-toggle,
.sa-map-search-toggle,
.sa-hes-filter-reset,
.sa-hes-filter-cancel,
.sa-hes-summary-edit,
.sa-hes-summary-clear,
.sa-route-clear,
.sa-route-close,
.sa-route-minimise,
.sa-route-stop-actions button {
  background: #fff;
  color: #173d4c;
}

.sa-location-button:hover,
.sa-location-button:focus-visible,
.sa-location-clear:hover,
.sa-location-clear:focus-visible,
.sa-records-toggle:hover,
.sa-records-toggle:focus-visible,
.sa-hes-toggle:hover,
.sa-hes-toggle:focus-visible,
.sa-sm-toggle:hover,
.sa-sm-toggle:focus-visible,
.sa-wikipedia-toggle:hover,
.sa-wikipedia-toggle:focus-visible,
.sa-hes-filter-toggle:hover,
.sa-hes-filter-toggle:focus-visible,
.sa-route-toggle:hover,
.sa-route-toggle:focus-visible,
.sa-map-expand:hover,
.sa-map-expand:focus-visible,
.sa-map-close:hover,
.sa-map-close:focus-visible,
.sa-map-controls-toggle:hover,
.sa-map-controls-toggle:focus-visible,
.sa-map-search-toggle:hover,
.sa-map-search-toggle:focus-visible,
.sa-hes-filter-reset:hover,
.sa-hes-filter-reset:focus-visible,
.sa-hes-filter-apply:hover,
.sa-hes-filter-apply:focus-visible,
.sa-hes-filter-cancel:hover,
.sa-hes-filter-cancel:focus-visible,
.sa-hes-summary-edit:hover,
.sa-hes-summary-edit:focus-visible,
.sa-hes-summary-clear:hover,
.sa-hes-summary-clear:focus-visible,
.sa-route-print:hover,
.sa-route-print:focus-visible,
.sa-route-clear:hover,
.sa-route-clear:focus-visible,
.sa-route-close:hover,
.sa-route-close:focus-visible,
.sa-route-generate:hover,
.sa-route-generate:focus-visible,
.sa-route-minimise:hover,
.sa-route-minimise:focus-visible,
.sa-route-stop-actions button:hover,
.sa-route-stop-actions button:focus-visible,
.sa-route-open:hover,
.sa-route-open:focus-visible {
  background: #fff;
  color: #173d4c;
}

.sa-location-button:focus-visible,
.sa-location-clear:focus-visible,
.sa-records-toggle:focus-visible,
.sa-hes-toggle:focus-visible,
.sa-sm-toggle:focus-visible,
.sa-wikipedia-toggle:focus-visible,
.sa-hes-filter-toggle:focus-visible,
.sa-route-toggle:focus-visible,
.sa-map-expand:focus-visible,
.sa-map-close:focus-visible,
.sa-map-controls-toggle:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.sa-map-search-toggle:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.sa-hes-filter-reset:focus-visible,
.sa-hes-filter-apply:focus-visible,
.sa-hes-filter-cancel:focus-visible,
.sa-hes-summary-edit:focus-visible,
.sa-hes-summary-clear:focus-visible,
.sa-route-print:focus-visible,
.sa-route-clear:focus-visible,
.sa-route-close:focus-visible,
.sa-route-generate:focus-visible,
.sa-route-minimise:focus-visible,
.sa-route-stop-actions button:focus-visible,
.sa-route-open:focus-visible,
.sa-hes-filter select:focus-visible,
.sa-route-setup select:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-location-button:disabled {
  cursor: wait;
  opacity: .7;
}

.sa-route-open {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.sa-route-open[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

.sa-route-print:disabled,
.sa-route-clear:disabled,
.sa-route-generate:disabled,
.sa-route-stop-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.sa-location-status {
  flex-basis: 100%;
  min-height: 1.5em;
}

.sa-location-status:empty,
.sa-hes-status:empty,
.sa-wikipedia-status:empty,
.sa-sm-status:empty,
.sa-nls-status:empty {
  display: none;
}

.sa-hes-status,
.sa-wikipedia-status,
.sa-sm-status,
.sa-nls-status {
  flex-basis: 100%;
  min-height: 1.5em;
  color: #334f5a;
}

.sa-hes-filters {
  margin: 0 0 .85rem;
  padding: .85rem;
  border: 2px solid #b8c7cc;
  border-radius: .45rem;
  background: #f5f8f9;
}

.sa-hes-filters[hidden] {
  display: none;
}

.sa-hes-filters legend {
  padding: 0 .35rem;
  color: #173d4c;
  font-weight: 800;
}

.sa-hes-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .75rem;
  align-items: end;
}

.sa-hes-filter {
  display: grid;
  gap: .25rem;
  font-weight: 700;
}

.sa-hes-filter select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 2px solid #506b75;
  border-radius: .35rem;
  background: #fff;
  color: #17252d;
  font: inherit;
}

.sa-hes-filter-note {
  margin: .7rem 0 0;
  color: #334f5a;
  font-size: .92em;
}

.sa-hes-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .75rem;
}

.sa-hes-filter-apply,
.sa-hes-filter-cancel {
  display: none;
}

.sa-hes-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .7rem;
  margin: 0 0 .75rem;
  color: #334f5a;
  font-size: .92em;
}

.sa-hes-legend[hidden] {
  display: none;
}

.sa-hes-legend > span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.sa-hes-legend-title {
  font-weight: 700;
}

.sa-hes-key {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #17252d;
  color: #fff;
  font: normal 800 .8rem/1 system-ui, sans-serif;
}

.sa-hes-key-a { background: #7b1833; }
.sa-hes-key-b { background: #174f63; }
.sa-hes-key-c { background: #326b36; }

.sa-record-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .7rem;
  margin: 0 0 .75rem;
  color: #334f5a;
  font-size: .92em;
}

.sa-record-legend > span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.sa-record-key {
  position: relative;
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: .45rem .45rem .85rem .85rem;
  background: #0f4656;
  box-shadow: 0 0 0 1px #17252d;
  color: #fff;
  font: normal 800 .68rem/1 system-ui, sans-serif;
}

.sa-record-key-badged b {
  position: absolute;
  right: -.45rem;
  bottom: -.35rem;
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #7b1833;
  box-shadow: 0 0 0 1px #17252d;
  font-size: .6rem;
}

.sa-record-key-sm {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #5b2c6f;
  box-shadow: 0 0 0 1px #17252d;
  color: #fff;
  font: normal 800 .7rem/1 system-ui, sans-serif;
}

.sa-layer-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .55rem;
  margin: 0 0 .75rem;
  color: #334f5a;
  font-size: .9rem;
}

.sa-layer-summary > span {
  padding: .3rem .55rem;
  border: 1px solid #aabac0;
  border-radius: 999px;
  background: #f3f6f7;
  color: #53666e;
  font-weight: 700;
}

.sa-layer-summary > span.is-active {
  border-color: #0f4656;
  background: #e4f0ed;
  color: #0f4656;
}

.sa-layer-summary > span[data-sa-layer="hes"].is-active { border-color: #7b1833; color: #7b1833; }
.sa-layer-summary > span[data-sa-layer="sm"].is-active { border-color: #5b2c6f; color: #5b2c6f; }
.sa-layer-summary > span[data-sa-layer="wikipedia"].is-active { border-color: #202122; color: #202122; }
.sa-layer-summary > span.is-loading { border-style: dashed; }
.sa-layer-summary > span.is-error { border-color: #9a3412; background: #fff4ed; color: #9a3412; }

.sa-hes-filter-count {
  margin-left: auto;
  color: #173d4c;
}

.sa-hes-filter-summary {
  display: none;
}

.sa-hes-filter-summary[hidden] {
  display: none !important;
}

.sa-hes-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.sa-hes-filter-chip {
  min-height: 36px;
  padding: .3rem .55rem;
  border: 2px solid #173d4c;
  border-radius: 999px;
  background: #edf4f5;
  color: #173d4c;
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.15;
  cursor: pointer;
}

.sa-hes-filter-chip:hover,
.sa-hes-filter-chip:focus-visible {
  background: #173d4c;
  color: #fff;
}

.sa-hes-filter-chip:focus-visible {
  outline: 3px solid #f6c453;
  outline-offset: 2px;
}

.sa-route-planner {
  margin: 0 0 .85rem;
  padding: 1rem;
  max-height: min(48vh, 32rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid #506b75;
  border-radius: .55rem;
  background: #f5f8f9;
  color: #17252d;
}

.sa-route-planner[hidden] {
  display: none !important;
}

.sa-route-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sa-route-minimise {
  flex: 0 0 auto;
  min-height: 40px;
  padding: .45rem .7rem;
  font-size: .9rem;
}

.sa-route-planner.is-minimised {
  bottom: auto !important;
  max-height: none !important;
}

.sa-route-planner.is-minimised > :not(.sa-route-header):not(.sa-route-result-summary) {
  display: none !important;
}

.sa-route-planner h4,
.sa-route-planner h5 {
  margin: 0 0 .55rem;
  color: #173d4c;
}

.sa-route-planner h5 {
  margin-top: 1rem;
}

.sa-route-setup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0;
  padding: .85rem;
  border: 1px solid #9eb0b7;
  border-radius: .45rem;
  background: #fff;
}

.sa-route-setup legend {
  padding: 0 .35rem;
  color: #173d4c;
  font-weight: 800;
}

.sa-route-setup label {
  display: grid;
  gap: .35rem;
  color: #173d4c;
  font-weight: 750;
}

.sa-route-setup select {
  min-height: 44px;
  padding: .55rem;
  border: 2px solid #506b75;
  border-radius: .35rem;
  background: #fff;
  color: #17252d;
  font: inherit;
}

.sa-route-generate {
  grid-column: 1 / -1;
  justify-self: start;
}

.sa-route-result-summary {
  margin: .85rem 0;
  padding: .8rem;
  border-left: .4rem solid #7b2f67;
  border-radius: .25rem;
  background: #f7edf4;
  color: #402037;
  font-weight: 750;
}

.sa-route-note,
.sa-route-available-note,
.sa-route-estimate,
.sa-route-discovery-note {
  color: #334f5a;
}

.sa-route-available-details,
.sa-route-diversions {
  margin-top: 1rem;
  border-top: 1px solid #b8c7cc;
}

.sa-route-available-details > summary,
.sa-route-diversions > summary {
  min-height: 44px;
  padding: .7rem 0;
  color: #173d4c;
  font-weight: 800;
  cursor: pointer;
}

.sa-route-available {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: .35rem .75rem;
  max-height: 17rem;
  padding: .35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #b8c7cc;
  border-radius: .35rem;
  background: #fff;
}

.sa-route-available label {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: .5rem;
  align-items: start;
  min-height: 44px;
  padding: .5rem;
  border-radius: .3rem;
  cursor: pointer;
}

.sa-route-available label:hover,
.sa-route-available label:focus-within {
  background: #e9f1ee;
}

.sa-route-available input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .1rem;
}

.sa-route-available input:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-route-selected {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding-left: 1.6rem;
}

.sa-route-selected li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .25rem .55rem;
  padding: .65rem;
  border: 1px solid #b8c7cc;
  border-radius: .35rem;
  background: #fff;
}

.sa-route-selected small {
  display: block;
  margin-top: .25rem;
  color: #334f5a;
}

.sa-route-landmark-details {
  min-width: 0;
}

.sa-route-landmark-details summary,
.sa-route-discovery-details > summary {
  color: #173d4c;
  font-weight: 800;
  cursor: pointer;
}

.sa-route-landmark-details small {
  padding-top: .35rem;
}

.sa-route-discovery-details {
  margin-top: 1rem;
  padding: .7rem;
  border: 1px solid #b8c7cc;
  border-radius: .35rem;
  background: #fff;
}

.sa-route-discovery-details > summary {
  min-height: 44px;
  line-height: 44px;
}

.sa-route-stop-actions,
.sa-route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .55rem;
}

.sa-route-stop-actions {
  grid-column: 2;
}

.sa-route-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px currentColor;
  color: #173d4c;
  font-weight: 900;
  line-height: 1;
}

.sa-route-category-a { color: #92213b; }
.sa-route-category-b { color: #0f5068; }
.sa-route-category-c { color: #2e6c3d; }

.sa-route-leg-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.sa-route-discoveries {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding-left: 1.4rem;
}

.sa-route-discoveries li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
  padding: .45rem .55rem;
  border-bottom: 1px solid #d6dfe2;
}

.sa-route-anchor-number {
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  font-weight: 900 !important;
}

.sa-route-stop-actions button {
  min-height: 40px;
  padding: .45rem .65rem;
  font-size: .9em;
}

.sa-route-estimate {
  margin-top: .85rem;
  font-weight: 700;
}

.sa-route-disclaimer {
  margin: 1rem 0 0;
  padding: .8rem;
  border-left: .35rem solid #8a5d00;
  background: #fff9e8;
  color: #493300;
  font-size: .92em;
}

.sa-map-note {
  margin-bottom: .55rem;
  color: #334f5a;
}

.sa-map-details {
  margin-top: .35rem;
  border-top: 1px solid #cad4d8;
  border-bottom: 1px solid #cad4d8;
}

.sa-map-details summary {
  padding: .75rem 0;
  color: #173d4c;
  font-weight: 800;
  cursor: pointer;
}

.sa-map-details summary:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-map-details-body {
  padding: 0 0 .3rem;
  color: #334f5a;
  font-size: .95em;
}

.sa-map-details-body p:first-child {
  margin-top: 0;
}

.sa-nearby-panel {
  margin: 1rem 0 .75rem;
  padding: 1rem;
  border: 2px solid #b8c7cc;
  border-radius: .45rem;
  background: #f5f8f9;
}

.sa-nearby-panel[hidden] {
  display: none;
}

.sa-nearby-panel h3,
.sa-nearby-panel h4 {
  margin-top: 0;
}

.sa-nearby-list {
  display: grid;
  gap: .75rem;
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.sa-nearby-item-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem .75rem;
}

.sa-nearby-item-heading strong {
  color: #173d4c;
  white-space: nowrap;
}

.sa-nearby-context,
.sa-nearby-map-link {
  display: block;
  margin-top: .2rem;
  font-size: .92em;
}

.sa-place-map {
  min-height: 420px;
}

.sa-places-map-shell {
  margin-bottom: 2.25rem;
}

.sa-places-map {
  min-height: 520px;
}

.sa-map-popup-summary {
  margin-top: .25rem;
  color: #334f5a;
  font-size: .92em;
}

.sa-place-map .leaflet-popup-content-wrapper {
  padding-top: .35rem;
  padding-right: 1.8rem;
}

.sa-place-map .leaflet-popup-close-button {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0 12px 0 12px;
  background: #173d4c;
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  text-align: center;
}

.sa-place-map .leaflet-popup-close-button:hover,
.sa-place-map .leaflet-popup-close-button:focus-visible {
  background: #fff;
  color: #173d4c;
  outline: 3px solid #173d4c;
  outline-offset: 2px;
}

.sa-hes-popup-details {
  margin: .35rem 0;
}

.sa-hes-popup-enrichment {
  margin: .35rem 0;
  font-size: .92em;
}

.sa-record-marker {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: .55rem .55rem 1rem 1rem;
  background: #0f4656;
  box-shadow: 0 0 0 2px #17252d, 0 2px 5px rgba(0, 0, 0, .38);
  color: #fff;
  font: 800 11px/1 system-ui, sans-serif;
  text-align: center;
}

.sa-record-marker span {
  line-height: 32px;
}

.sa-record-marker-listed {
  font-size: 10px;
}

.sa-record-marker b {
  position: absolute;
  right: -6px;
  bottom: -5px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #17252d;
  color: #fff;
  font: 800 10px/1 system-ui, sans-serif;
}

.sa-record-marker-category-a b {
  background: #7b1833;
}

.sa-record-marker-category-b b {
  background: #174f63;
}

.sa-record-marker-category-c b {
  background: #326b36;
}

.sa-record-marker-sm b {
  width: 23px;
  background: #5b2c6f;
  font-size: 8px;
}

.sa-record-marker:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.sa-hes-marker {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #17252d, 0 2px 5px rgba(0, 0, 0, .38);
  color: #fff;
  font: 800 14px/1 system-ui, sans-serif;
  text-align: center;
}

.sa-hes-marker span {
  line-height: 22px;
}

.sa-hes-category-a {
  background: #7b1833;
}

.sa-hes-category-b {
  background: #174f63;
}

.sa-hes-category-c {
  background: #326b36;
}

.sa-hes-category-other {
  background: #4b5256;
}

.sa-hes-marker:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.sa-sm-marker {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #5b2c6f;
  box-shadow: 0 0 0 2px #17252d, 0 2px 5px rgba(0, 0, 0, .38);
  color: #fff;
  font: 800 10px/1 system-ui, sans-serif;
  text-align: center;
}

.sa-sm-marker span {
  line-height: 28px;
}

.sa-sm-marker:focus-visible,
.sa-sm-cluster:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.sa-sm-popup-details,
.sa-sm-popup-description {
  margin: .4rem 0;
  max-width: 20rem;
}

.sa-sm-popup-description {
  color: #334f5a;
  font-size: .92em;
}

.sa-wikipedia-marker {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #202122;
  box-shadow: 0 0 0 2px #17252d, 0 2px 5px rgba(0, 0, 0, .38);
  color: #fff;
  font: 800 14px/1 system-ui, sans-serif;
  text-align: center;
}

.sa-wikipedia-marker span {
  line-height: 24px;
}

.sa-wikipedia-marker:focus-visible,
.sa-wikipedia-cluster:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

/* Markers from different live data sources can share the same point. Keep the
 * Scotland's Architecture marker anchored and fan the other sources into
 * separate touch targets without changing their stored coordinates. */
.leaflet-marker-icon.sa-marker-separated {
  translate: var(--sa-marker-collision-x, 0) var(--sa-marker-collision-y, 0);
  transition: translate .16s ease-out;
  z-index: 1000 !important;
}

.leaflet-marker-icon.sa-marker-collision-anchor {
  z-index: 1001 !important;
}

.leaflet-marker-icon.sa-marker-separated::before,
.leaflet-marker-icon.sa-marker-collision-anchor::before {
  position: absolute;
  inset: -7px;
  content: '';
  border: 2px solid rgba(255, 191, 71, .9);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  pointer-events: auto;
}

.sa-record-cluster,
.sa-record-cluster div {
  border-radius: .7rem .7rem 1.2rem 1.2rem;
}

.sa-record-cluster {
  box-sizing: border-box;
  background: rgba(15, 70, 86, .24);
}

.sa-record-cluster div {
  display: grid;
  grid-template-columns: auto auto;
  gap: .2rem;
  width: 40px;
  height: 40px;
  margin: 4px;
  place-content: center;
  background: #0f4656;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
}

.sa-record-cluster:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.sa-wikipedia-cluster,
.sa-wikipedia-cluster div {
  border-radius: 50%;
}

.sa-wikipedia-cluster {
  box-sizing: border-box;
  background: rgba(32, 33, 34, .22);
}

.sa-wikipedia-cluster div {
  display: grid;
  grid-template-columns: auto auto;
  gap: .2rem;
  width: 36px;
  height: 36px;
  margin: 4px;
  place-content: center;
  background: #202122;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.sa-wikipedia-popup-note {
  margin: .4rem 0;
  max-width: 18rem;
  color: #334f5a;
  font-size: .92em;
}

.sa-hes-cluster,
.sa-hes-cluster div {
  border-radius: 50%;
}

.sa-hes-cluster {
  box-sizing: border-box;
  background: rgba(123, 24, 51, .25);
}

.sa-hes-cluster div {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 4px;
  place-items: center;
  background: #7b1833;
  color: #fff;
  font-weight: 800;
}

.sa-hes-cluster:focus-visible {
  outline: 4px solid #ffbf47;
  outline-offset: 3px;
}

.sa-sm-cluster,
.sa-sm-cluster div {
  border-radius: 50%;
}

.sa-sm-cluster {
  box-sizing: border-box;
  background: rgba(91, 44, 111, .24);
}

.sa-sm-cluster div {
  display: grid;
  grid-template-columns: auto auto;
  gap: .16rem;
  width: 40px;
  height: 40px;
  margin: 4px;
  place-content: center;
  background: #5b2c6f;
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
}

body.sa-map-expanded {
  overflow: hidden;
}

.sa-map-frame.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 100000;
  box-sizing: border-box;
  display: block;
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.sa-map-frame.is-expanded .sa-location-actions {
  position: absolute;
  top: max(.65rem, env(safe-area-inset-top));
  right: max(.65rem, env(safe-area-inset-right));
  left: max(.65rem, env(safe-area-inset-left));
  z-index: 100002;
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  box-sizing: border-box;
  margin: 0;
  padding: .35rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid rgba(23, 61, 76, .4);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 .2rem .8rem rgba(23, 37, 45, .28);
  scrollbar-width: thin;
}

.sa-map-frame.is-expanded .sa-location-actions > button {
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
  padding: .45rem .7rem;
  font-size: .9rem;
  line-height: 1.15;
  white-space: nowrap;
}

.sa-map-frame.is-expanded .sa-place-search {
  display: none !important;
}

.sa-map-frame.is-expanded .sa-map-zoom-hint {
  display: none;
}

.sa-map-frame.is-expanded.is-search-sheet-open .sa-place-search {
  position: absolute;
  top: calc(max(.65rem, env(safe-area-inset-top)) + 3.7rem);
  left: max(.65rem, env(safe-area-inset-left));
  z-index: 100003;
  display: grid !important;
  box-sizing: border-box;
  width: min(38rem, calc(100% - 1.3rem));
  max-height: calc(100dvh - 5rem);
  margin: 0;
  padding: .8rem;
  overflow-y: auto;
  border: 2px solid #173d4c;
  border-radius: .55rem;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 .35rem 1.15rem rgba(23, 37, 45, .3);
}

.sa-map-frame.is-expanded .sa-hes-filters:not([hidden]),
.sa-map-frame.is-expanded .sa-route-planner:not([hidden]) {
  position: absolute;
  top: calc(max(.65rem, env(safe-area-inset-top)) + 3.7rem);
  right: max(.65rem, env(safe-area-inset-right));
  bottom: max(.65rem, env(safe-area-inset-bottom));
  z-index: 100003;
  box-sizing: border-box;
  width: min(38rem, calc(100% - 1.3rem));
  max-height: none;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-color: #506b75;
  border-radius: .65rem;
  background: rgba(245, 248, 249, .98);
  box-shadow: 0 .35rem 1.25rem rgba(23, 37, 45, .32);
}

.sa-map-frame.is-expanded .sa-hes-filters:not([hidden]) {
  bottom: auto;
  max-height: calc(100dvh - 5rem);
}

.sa-map-frame.is-expanded .sa-hes-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sa-map-frame.is-expanded .sa-hes-filter-actions {
  position: sticky;
  bottom: -.85rem;
  z-index: 1;
  padding: .7rem 0 .15rem;
  background: #f5f8f9;
}

.sa-map-frame.is-expanded .sa-hes-filter-apply,
.sa-map-frame.is-expanded .sa-hes-filter-cancel {
  display: block;
}

.sa-map-frame.is-expanded .sa-map-expand {
  display: none;
}

.sa-map-frame.is-expanded .sa-map-close {
  order: -1;
}

.sa-map-frame.is-expanded .sa-map-controls-toggle {
  order: -1;
}

.sa-map-frame.is-expanded.is-controls-collapsed .sa-location-actions > button:not(.sa-map-close):not(.sa-map-controls-toggle) {
  display: none !important;
}

.sa-map-frame.is-expanded.is-controls-collapsed:not(.is-filter-sheet-open) .sa-hes-filters {
  display: none !important;
}

.sa-map-frame.is-expanded.is-controls-collapsed:not(.is-route-sheet-open) .sa-route-planner {
  display: none !important;
}

.sa-map-frame.is-expanded.is-controls-collapsed .sa-location-status,
.sa-map-frame.is-expanded.is-controls-collapsed .sa-nls-status,
.sa-map-frame.is-expanded.is-controls-collapsed .sa-hes-status,
.sa-map-frame.is-expanded.is-controls-collapsed .sa-sm-status,
.sa-map-frame.is-expanded.is-controls-collapsed .sa-wikipedia-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.sa-map-frame.is-expanded.is-controls-collapsed .sa-location-actions {
  left: auto;
  justify-content: flex-end;
}

.sa-map-frame.is-expanded.is-controls-collapsed .sa-layer-summary {
  display: none;
}

.sa-map-frame.is-expanded .sa-place-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
}

/* Keep Leaflet's upper-left controls clear of the expanded options toolbar.
 * The script measures the toolbar because its height changes with the
 * viewport, text wrapping and the number of available map layers. */
.sa-map-frame.is-expanded:not(.is-controls-collapsed) .sa-place-map .leaflet-top.leaflet-left {
  top: var(--sa-map-actions-bottom, 5.5rem);
  transition: top .15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon.sa-marker-separated {
    transition: none;
  }

  .sa-map-frame.is-expanded:not(.is-controls-collapsed) .sa-place-map .leaflet-top.leaflet-left {
    transition: none;
  }
}

.sa-map-frame.is-expanded .sa-location-status,
.sa-map-frame.is-expanded .sa-nls-status,
.sa-map-frame.is-expanded .sa-hes-status,
.sa-map-frame.is-expanded .sa-sm-status,
.sa-map-frame.is-expanded .sa-wikipedia-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.sa-map-frame.is-expanded .sa-hes-legend:not([hidden]) {
  display: none;
}

.sa-map-frame.is-expanded .sa-record-legend {
  display: none;
}

.sa-map-frame.is-expanded .sa-layer-summary {
  position: absolute;
  bottom: max(.65rem, env(safe-area-inset-bottom));
  left: max(.65rem, env(safe-area-inset-left));
  z-index: 100001;
  box-sizing: border-box;
  max-width: calc(100% - 19rem);
  margin: 0;
  padding: .35rem .5rem;
  border: 1px solid rgba(23, 61, 76, .45);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 .15rem .55rem rgba(23, 37, 45, .2);
  font-size: .78rem;
}

.sa-map-frame.is-expanded .sa-hes-filter-summary:not([hidden]) {
  position: absolute;
  top: calc(max(.65rem, env(safe-area-inset-top)) + 3.7rem);
  left: max(.65rem, env(safe-area-inset-left));
  z-index: 100002;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  box-sizing: border-box;
  max-width: min(52rem, calc(100% - 2rem));
  min-height: 44px;
  margin: 0;
  padding: .35rem .45rem;
  border: 1px solid rgba(23, 61, 76, .45);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .96);
  color: #173d4c;
  box-shadow: 0 .2rem .7rem rgba(23, 37, 45, .24);
}

.sa-map-frame.is-expanded.is-filter-sheet-open .sa-hes-filter-summary,
.sa-map-frame.is-expanded.is-route-sheet-open .sa-hes-filter-summary,
.sa-map-frame.is-expanded.is-search-sheet-open .sa-hes-filter-summary {
  display: none !important;
}

.sa-map-frame.is-expanded .sa-hes-filter-summary-text {
  font-size: .88rem;
}

.sa-map-frame.is-expanded .sa-hes-summary-edit,
.sa-map-frame.is-expanded .sa-hes-summary-clear {
  min-height: 36px;
  padding: .3rem .55rem;
  font-size: .84rem;
}

.sa-map-credit-toggle,
.sa-map-credit-panel {
  display: none;
}

.sa-map-frame.is-expanded .leaflet-control-attribution {
  display: none;
}

.sa-map-frame.is-expanded .sa-map-credit-toggle {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100002;
  display: block;
  box-sizing: border-box;
  max-width: calc(100% - 2rem);
  min-height: 44px;
  padding: .45rem .7rem;
  border: 2px solid #173d4c;
  border-radius: .45rem;
  background: rgba(255, 255, 255, .97);
  color: #173d4c;
  box-shadow: 0 .2rem .65rem rgba(23, 37, 45, .24);
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.sa-map-frame.is-expanded .sa-map-credit-toggle:hover,
.sa-map-frame.is-expanded .sa-map-credit-toggle:focus-visible,
.sa-map-frame.is-expanded .sa-map-credit-close:hover,
.sa-map-frame.is-expanded .sa-map-credit-close:focus-visible {
  background: #173d4c;
  color: #fff;
}

.sa-map-frame.is-expanded .sa-map-credit-toggle:focus-visible,
.sa-map-frame.is-expanded .sa-map-credit-close:focus-visible {
  outline: 3px solid #f6c453;
  outline-offset: 2px;
}

.sa-map-frame.is-expanded .sa-map-credit-panel:not([hidden]) {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.5rem);
  z-index: 100004;
  display: block;
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: min(42vh, 22rem);
  max-height: min(42dvh, 22rem);
  padding: .85rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid #173d4c;
  border-radius: .65rem;
  background: rgba(255, 255, 255, .98);
  color: #17252d;
  box-shadow: 0 -.35rem 1.25rem rgba(23, 37, 45, .3);
}

.sa-map-credit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.sa-map-credit-heading h4,
.sa-map-credit-panel p {
  margin: 0;
}

.sa-map-credit-panel p + p {
  margin-top: .65rem;
}

.sa-map-credit-close {
  flex: 0 0 auto;
  min-height: 44px;
  padding: .5rem .75rem;
  border: 2px solid #173d4c;
  border-radius: .4rem;
  background: #fff;
  color: #173d4c;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.sa-place-map .leaflet-marker-icon:focus {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

.sa-place-map .marker-cluster-small,
.sa-place-map .marker-cluster-medium,
.sa-place-map .marker-cluster-large {
  background: rgba(23, 61, 76, .22);
}

.sa-place-map .marker-cluster-small div,
.sa-place-map .marker-cluster-medium div,
.sa-place-map .marker-cluster-large div {
  background: #173d4c;
  color: #fff;
  font-weight: 700;
}

.sa-place-map .marker-cluster:focus-visible {
  outline: 3px solid #173d4c;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .sa-place-map-entry {
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
    padding: .75rem;
  }

  .sa-place-map-open {
    width: 100%;
  }

  .sa-location-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }

  .sa-map-frame.is-expanded .sa-location-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: .35rem;
    max-height: min(46dvh, 24rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sa-location-button,
  .sa-location-clear,
  .sa-hes-toggle,
  .sa-sm-toggle,
  .sa-wikipedia-toggle,
  .sa-hes-filter-toggle,
  .sa-route-toggle,
  .sa-map-expand,
  .sa-map-close,
  .sa-map-controls-toggle,
  .sa-map-search-toggle,
  .sa-hes-filter-reset,
  .sa-hes-filter-apply,
  .sa-hes-filter-cancel,
  .sa-route-print,
  .sa-route-clear,
  .sa-route-close,
  .sa-route-generate,
  .sa-route-minimise,
  .sa-route-open {
    width: 100%;
    padding-right: .55rem;
    padding-left: .55rem;
    font-size: .94em;
  }

  .sa-map-frame.is-expanded .sa-location-actions > button {
    width: 100%;
    min-width: 0;
    padding-right: .6rem;
    padding-left: .6rem;
    font-size: .86rem;
    line-height: 1.25;
    white-space: normal;
  }

  .sa-map-frame.is-expanded.is-controls-collapsed .sa-location-actions {
    display: flex;
    left: auto;
    width: auto;
    max-height: none;
    overflow: visible;
  }

  .sa-map-frame.is-expanded.is-controls-collapsed .sa-map-close,
  .sa-map-frame.is-expanded.is-controls-collapsed .sa-map-controls-toggle {
    width: auto;
    white-space: nowrap;
  }

  .sa-location-status,
  .sa-hes-status,
  .sa-sm-status,
  .sa-wikipedia-status {
    grid-column: 1 / -1;
  }

  .sa-place-search-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sa-place-search-button {
    width: auto;
  }

  .sa-hes-filter-count {
    flex-basis: 100%;
    margin-left: 0;
  }

  .sa-hes-filter-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: .65rem;
    background: #f5f8f9;
  }

  .sa-hes-filter-apply,
  .sa-hes-filter-cancel {
    display: block;
  }

  .sa-hes-filter-reset {
    grid-column: 1 / -1;
  }

  .sa-hes-filter-summary {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    margin: 0 0 .55rem;
    padding: .4rem .5rem;
    border: 2px solid #b8c7cc;
    border-radius: .45rem;
    background: #f5f8f9;
    color: #173d4c;
  }

  .sa-hes-filter-summary:focus-visible {
    outline: 3px solid #173d4c;
    outline-offset: 2px;
  }

  .sa-hes-filter-summary-text {
    flex: 1 1 auto;
    font-size: .9rem;
    line-height: 1.25;
  }

  .sa-map-frame.is-expanded .sa-hes-filter-summary:not([hidden]) {
    right: max(.5rem, env(safe-area-inset-right));
    left: max(.5rem, env(safe-area-inset-left));
    max-width: none;
    max-height: 9rem;
    overflow-y: auto;
  }

  .sa-map-frame.is-expanded .sa-hes-filter-chips {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .sa-hes-summary-edit,
  .sa-hes-summary-clear {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .45rem .55rem;
    font-size: .88rem;
  }

  .sa-place-map {
    min-height: 340px;
  }

  .sa-places-map {
    min-height: 380px;
  }

  .sa-map-frame.is-expanded.is-search-sheet-open .sa-place-search {
    top: calc(max(.5rem, env(safe-area-inset-top)) + 3.65rem);
    right: max(.5rem, env(safe-area-inset-right));
    left: max(.5rem, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - 4.65rem);
  }

  .sa-map-frame.is-expanded .sa-hes-filter-grid {
    grid-template-columns: 1fr;
  }

  .sa-map-frame.is-expanded .sa-hes-filters:not([hidden]) {
    top: auto;
    position: absolute;
    right: max(.5rem, env(safe-area-inset-right));
    bottom: max(.5rem, env(safe-area-inset-bottom));
    left: max(.5rem, env(safe-area-inset-left));
    z-index: 100003;
    box-sizing: border-box;
    max-height: 62vh;
    max-height: 62dvh;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: #506b75;
    border-radius: .8rem .8rem .35rem .35rem;
    box-shadow: 0 -.35rem 1.25rem rgba(23, 37, 45, .3);
  }

  .sa-map-frame.is-expanded .sa-route-planner:not([hidden]) {
    top: auto;
    position: absolute;
    right: max(.5rem, env(safe-area-inset-right));
    bottom: max(.5rem, env(safe-area-inset-bottom));
    left: max(.5rem, env(safe-area-inset-left));
    z-index: 100003;
    box-sizing: border-box;
    max-height: 58vh;
    max-height: 58dvh;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: .8rem .8rem .35rem .35rem;
    box-shadow: 0 -.35rem 1.25rem rgba(23, 37, 45, .3);
  }

  .sa-route-available {
    grid-template-columns: 1fr;
    max-height: 14rem;
  }

  .sa-route-setup {
    grid-template-columns: 1fr;
  }

  .sa-route-generate {
    width: 100%;
  }

  .sa-route-planner.is-minimised {
    right: max(.5rem, env(safe-area-inset-right));
    bottom: max(.5rem, env(safe-area-inset-bottom));
    left: max(.5rem, env(safe-area-inset-left));
  }

  .sa-route-actions {
    position: sticky;
    bottom: -.1rem;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    padding-top: .65rem;
    background: #f5f8f9;
  }

  .sa-map-frame.is-expanded .sa-map-credit-toggle {
    right: max(.5rem, env(safe-area-inset-right));
    bottom: max(.5rem, env(safe-area-inset-bottom));
    left: max(.5rem, env(safe-area-inset-left));
    max-width: none;
    font-size: .76rem;
    text-align: center;
  }

  .sa-map-frame.is-expanded .sa-layer-summary {
    right: max(.5rem, env(safe-area-inset-right));
    bottom: calc(max(.5rem, env(safe-area-inset-bottom)) + 3.65rem);
    left: max(.5rem, env(safe-area-inset-left));
    max-width: none;
    max-height: 5.8rem;
    overflow-y: auto;
  }

  .sa-map-frame.is-expanded .sa-hes-legend:not([hidden]) {
    right: max(.5rem, env(safe-area-inset-right));
    bottom: calc(max(.5rem, env(safe-area-inset-bottom)) + 3.65rem);
    left: max(.5rem, env(safe-area-inset-left));
    max-width: none;
    justify-content: center;
  }

  .sa-map-frame.is-expanded .sa-hes-filter-count {
    flex-basis: auto;
    margin-left: auto;
  }

  .sa-map-frame.is-expanded .sa-map-credit-panel:not([hidden]) {
    right: max(.5rem, env(safe-area-inset-right));
    bottom: calc(max(.5rem, env(safe-area-inset-bottom)) + 3.5rem);
    left: max(.5rem, env(safe-area-inset-left));
    width: auto;
    max-height: 44vh;
    max-height: 44dvh;
  }
}

@media print {
  body.single-sa_record main a[href^="http"] {
    color: inherit;
    text-decoration: underline;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.single-sa_record main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .88em;
    font-weight: 400;
  }

  .sa-location-actions,
  .sa-map-frame.is-expanded .sa-location-actions,
  .sa-route-planner {
    display: none !important;
  }

  .sa-map-frame.is-expanded {
    position: static;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
  }

  .sa-map-frame.is-expanded .sa-place-map {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .sa-directory-filter-grid {
    grid-template-columns: 1fr;
  }

  .sa-directory-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sa-directory-actions button,
  .sa-directory-actions a {
    justify-content: center;
    width: 100%;
  }
}
