.pota-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 52px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.pota-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(108, 247, 255, .13), transparent 34%);
}

.pota-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 48px;
  align-items: end;
}

.pota-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1;
}

.pota-lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.pota-search {
  padding: 24px;
  border: 1px solid rgba(108, 247, 255, .16);
  border-radius: var(--radius);
  background: rgba(10, 18, 38, .84);
  box-shadow: var(--shadow);
}

.pota-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pota-search-row {
  display: flex;
  gap: 12px;
}

.pota-search input {
  min-width: 0;
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #081126;
  font: inherit;
  text-transform: uppercase;
}

.pota-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(108, 247, 255, .12);
}

.pota-search button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.pota-examples {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.pota-examples a,
.pota-relation-footer a {
  color: var(--cyan);
}

.pota-content {
  min-height: 54vh;
}

.pota-status,
.pota-empty {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(16, 26, 51, .72);
}

.pota-status.is-error {
  border-color: rgba(255, 107, 107, .34);
  color: #ffd3d3;
}

.pota-status.is-loading {
  color: var(--cyan);
}

.pota-result {
  display: grid;
  gap: 28px;
}

.pota-title-row,
.pota-section-heading,
.pota-relation-heading,
.pota-relation-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.pota-title-row h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.pota-badge,
.pota-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 189, 110, .13);
  font-size: .82rem;
  font-weight: 800;
  text-transform: capitalize;
}

.pota-badge.is-active,
.pota-badge.is-confirmed {
  color: var(--green);
  background: rgba(110, 255, 184, .13);
}

.pota-count {
  min-width: 46px;
  color: var(--cyan);
  background: rgba(108, 247, 255, .1);
}

.pota-summary-grid {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  gap: 24px;
}

.pota-panel,
.pota-relations {
  padding: 28px;
  border: 1px solid rgba(99, 179, 255, .14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 26, 51, .96), rgba(8, 16, 34, .96));
  box-shadow: var(--shadow);
}

.pota-panel h3,
.pota-relations h3 {
  margin: 0 0 24px;
  font-size: 1.55rem;
}

.pota-data-list {
  margin: 0;
}

.pota-data-list > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-top: 1px solid rgba(143, 163, 199, .13);
}

.pota-data-list dt {
  color: var(--muted);
}

.pota-data-list dd {
  margin: 0;
  text-align: right;
}

.pota-data-list.compact > div {
  padding: 10px 0;
}

#pota-map {
  height: 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: #07111f;
}

#pota-map.is-empty {
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
}

.pota-map-shell {
  position: relative;
}

.pota-map-legend {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid rgba(108, 247, 255, .2);
  border-radius: 12px;
  color: var(--text);
  background: rgba(5, 8, 22, .9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  font-size: .78rem;
  pointer-events: none;
}

.pota-map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pota-map-legend i {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #dfffff;
  border-radius: 50%;
}

.pota-map-legend .is-boundary {
  width: 22px;
  height: 10px;
  border-color: var(--cyan);
  border-radius: 3px;
  background: rgba(53, 190, 212, .35);
}

.pota-map-legend .is-pota {
  background: var(--cyan);
}

.pota-map-legend .is-check {
  background: var(--orange);
}

.location-check {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(108, 247, 255, .13);
  border-radius: 16px;
  background: rgba(5, 12, 29, .6);
}

.location-check-fields {
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr) auto minmax(100px, 1fr);
  gap: 10px;
  align-items: center;
}

.location-check label {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.location-check input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #081126;
  font: inherit;
}

.location-check input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(108, 247, 255, .1);
}

.location-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.location-check button {
  cursor: pointer;
  font: inherit;
}

.location-check .button.ghost {
  border: 1px solid rgba(108, 247, 255, .24);
  color: var(--cyan);
  background: transparent;
}

.location-result {
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font-weight: 750;
  line-height: 1.5;
}

.location-result.is-inside {
  border-color: rgba(110, 255, 184, .35);
  color: var(--green);
  background: rgba(110, 255, 184, .09);
}

.location-result.is-outside,
.location-result.is-insufficient {
  border-color: rgba(255, 189, 110, .35);
  color: var(--orange);
  background: rgba(255, 189, 110, .09);
}

.location-result.is-error {
  border-color: rgba(255, 107, 107, .35);
  color: #ffd3d3;
  background: rgba(255, 107, 107, .08);
}

.location-result.is-loading {
  color: var(--cyan);
}

.location-overlaps {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(108, 247, 255, .18);
  border-radius: 16px;
  background: rgba(5, 12, 29, .66);
}

.location-overlaps-heading,
.location-overlap-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.location-overlaps-heading h4 {
  margin: 0;
  font-size: 1.15rem;
}

.location-overlap-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.location-overlap-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.location-overlap-card.is-selected {
  border-color: rgba(110, 255, 184, .25);
}

.location-overlap-heading a {
  color: var(--cyan);
  font-weight: 800;
  line-height: 1.45;
}

.location-overlap-features {
  display: grid;
  gap: 8px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.location-overlap-features li {
  display: grid;
  gap: 3px;
}

.location-overlap-features strong {
  font-size: .9rem;
}

.location-overlap-features span,
.location-overlap-empty {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.location-overlap-empty {
  margin: 14px 0 0;
}

.pota-warning {
  margin: 18px 0 0;
  color: var(--orange);
  line-height: 1.65;
}

.pota-relation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.pota-relation-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
}

.pota-relation-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.pota-relation-heading h4 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.45;
}

.pota-relation-footer {
  align-items: flex-start;
  margin-top: 18px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.pota-empty {
  margin: 18px 0 0;
}

@media (max-width: 850px) {
  .pota-hero-grid,
  .pota-summary-grid {
    grid-template-columns: 1fr;
  }

  .pota-hero {
    padding-top: 48px;
  }

  .location-check-fields {
    grid-template-columns: auto 1fr;
  }
}

@media (max-width: 600px) {
  .pota-search-row,
  .pota-title-row,
  .pota-section-heading,
  .pota-relation-heading,
  .pota-relation-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pota-search button {
    width: 100%;
  }

  .pota-panel,
  .pota-relations {
    padding: 20px;
  }

  .pota-data-list > div {
    display: block;
  }

  .pota-data-list dd {
    margin-top: 6px;
    text-align: left;
  }

  .pota-relation-grid {
    grid-template-columns: 1fr;
  }

  #pota-map {
    height: 360px;
  }

  .pota-map-legend {
    right: 8px;
    top: 8px;
  }

  .location-check-actions,
  .location-check-actions .button {
    width: 100%;
  }

  .location-overlaps-heading,
  .location-overlap-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

.pota-location-discovery {
  padding-top: 0;
}

.pota-location-finder {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(108, 247, 255, .16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16, 26, 51, .95), rgba(8, 16, 34, .95));
  box-shadow: var(--shadow);
}

.pota-location-finder h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.pota-location-finder-copy > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.pota-location-search {
  display: grid;
  gap: 14px;
}

.pota-location-search-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pota-location-search label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.pota-location-search input {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #081126;
  font: inherit;
}

.pota-location-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(108, 247, 255, .1);
}

.pota-location-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pota-location-search-actions button {
  cursor: pointer;
  font: inherit;
}

.pota-location-search-actions .button.ghost {
  border: 1px solid rgba(108, 247, 255, .24);
  color: var(--cyan);
  background: transparent;
}

.pota-location-search .location-result {
  margin-top: 0;
}

.pota-location-search-results {
  display: grid;
  gap: 10px;
}

@media (max-width: 850px) {
  .pota-location-finder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pota-location-finder {
    padding: 20px;
  }

  .pota-location-search-fields {
    grid-template-columns: 1fr;
  }

  .pota-location-search-actions,
  .pota-location-search-actions .button {
    width: 100%;
  }
}


.location-nearest-distance {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 189, 110, .13);
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
}

.location-nearest-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.pota-location-map-panel {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 24px;
  border-top: 1px solid rgba(108, 247, 255, .13);
}

.pota-location-map-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 14px;
}

.pota-location-map-heading h3,
.pota-location-map-heading p {
  margin: 0;
}

.pota-location-map-heading > p {
  max-width: 520px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  text-align: right;
}

.pota-location-map-shell {
  position: relative;
}

#pota-location-search-map {
  height: 460px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: #07111f;
}

.pota-location-map-legend {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  max-width: min(300px, calc(100% - 28px));
  padding: 11px 13px;
  border: 1px solid rgba(108, 247, 255, .2);
  border-radius: 12px;
  color: var(--text);
  background: rgba(5, 8, 22, .9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  font-size: .78rem;
  pointer-events: none;
}

.pota-location-map-legend span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pota-location-map-legend i {
  width: 24px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 28%, transparent);
}

.pota-location-map-legend i.is-location {
  width: 13px;
  height: 13px;
  border-color: #fff4e0;
  border-radius: 50%;
  color: #ffbd6e;
  background: #ffbd6e;
}

.pota-location-map-legend i.is-shared {
  color: #ff4fa3;
  background: #ff4fa3;
}

.pota-location-overlap-summary {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 79, 163, .28);
  border-radius: 12px;
  color: #ffd7ea;
  background: rgba(255, 79, 163, .08);
  line-height: 1.55;
}

.pota-map-legend .is-related {
  width: 22px;
  height: 0;
  border-color: #ffbd6e;
  border-radius: 0;
  background: transparent;
}

.pota-map-legend .is-shared {
  width: 22px;
  height: 0;
  border-color: #ff4fa3;
  border-width: 3px;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 600px) {
  .pota-location-map-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .pota-location-map-heading > p {
    text-align: left;
  }

  #pota-location-search-map {
    height: 360px;
  }

  .pota-location-map-legend {
    top: 8px;
    right: 8px;
  }
}

