.terr {
  max-width: 1530px;
  margin: 125px auto 0;
  background: rgba(71, 82, 110, 0.25);
  border-radius: 50px;
  padding: 100px;
}
@media (max-width: 1200px) {
  .terr {
    padding: 60px 40px;
    border-radius: 30px;
  }
}
@media (max-width: 767px) {
  .terr {
    padding: 40px 20px;
    border-radius: 24px;
  }
}

.terr__heading {
  font-family: var(--font-primary);
  font-size: 42px;
  line-height: 1.25;
  color: var(--naa-para-text);
  margin: 0;
  text-align: center;
  margin: 0 0 12px;
}

.terr__subtitle {
  font-family: var(--ff-regular);
  font-size: 18px;
  line-height: 1.25;
  color: var(--naa-para-text);
  margin: 0;
  color: var(--naa-para-text-alt);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.terr__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 10px 32px;
  width: fit-content;
  border: 1px solid var(--naa-para-text);
  border-radius: 50px;
  background: var(--naa-para-text);
  color: var(--naa-primary-btn);
  font-family: var(--ff-semibold);
  font-size: var(--font-size-18);
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s, color 0.2s;
}
.terr__toggle::-webkit-details-marker {
  display: none;
}
.terr__toggle:hover {
  background: transparent;
  color: var(--naa-para-text);
}
.terr__toggle:focus-visible {
  outline: 2px solid var(--naa-highlight-text);
  outline-offset: 3px;
}

details[open] > .terr__toggle {
  margin-bottom: 40px;
}

.terr__layout {
  display: flex;
  align-items: stretch;
  gap: 0;
  aspect-ratio: 1440/900;
  background: rgba(56, 66, 90, 0.25);
  border: 1px solid #33415e;
  border-radius: 30px;
  overflow: hidden;
}

.terr__map {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 0 24px 24px;
  display: flex;
  align-items: flex-start;
}

.terr__map-canvas {
  flex: 1;
  min-width: 0;
  display: flex;
  aspect-ratio: 975/610;
}
.terr__map-canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.terr:not(.terr--enhanced) .terr__map,
.terr--map-failed .terr__map {
  display: none;
}

.terr:not(.terr--enhanced) .terr__layout,
.terr--map-failed .terr__layout {
  aspect-ratio: auto;
  min-height: 0;
}

.terr__region--assigned {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.terr__tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, -130%);
  min-width: 170px;
  padding: 10px 14px;
  background: #1c2638;
  border: 1px solid #3b4a68;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--ff-regular);
}

.terr__tooltip--below {
  transform: translate(-50%, 24px);
}

.terr__tooltip-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terr__tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.terr__tooltip-territory {
  font-family: var(--ff-bold);
  font-size: var(--font-size-13);
  color: var(--naa-title-text);
}

.terr__tooltip-state {
  font-size: var(--font-size-12);
  color: #9ba1ac;
  margin-top: 3px;
}

.terr__tooltip-rep {
  font-size: var(--font-size-12);
  color: var(--naa-para-text);
  margin-top: 3px;
}

.terr__panel {
  width: 368px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #2a3750;
  border-left: 1px solid #33415e;
}

.terr__panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #33415e;
}

.terr__panel-title {
  font-family: var(--ff-bold);
  font-size: var(--font-size-15);
  color: var(--naa-title-text);
}

.terr__panel-count {
  font-family: var(--ff-bold);
  font-size: var(--font-size-15);
  color: var(--naa-highlight-text);
}
.terr__panel-count::before {
  content: "|";
  color: #4a5468;
  margin-right: 10px;
  font-family: var(--ff-regular);
}

.terr__clear {
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--ff-regular);
  font-size: var(--font-size-12);
  color: #9ba1ac;
  transition: color 0.15s ease;
}
.terr__clear:hover, .terr__clear:focus-visible {
  color: var(--naa-title-text);
}

.terr__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.terr__list::-webkit-scrollbar {
  width: 6px;
  z-index: 999999;
}
.terr__list::-webkit-scrollbar-track {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  z-index: 999999;
  border: 0;
}
.terr__list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: #3b4a68;
  box-shadow: none;
  z-index: 999999;
  border: 0;
}
.terr__list {
  scroll-padding-bottom: 76px;
}

.terr:not(.terr--enhanced) .terr__list,
.terr--map-failed .terr__list {
  max-height: 560px;
}

.terr__item {
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.terr__item--hovered {
  background: #303e5a;
}

.terr__item--selected {
  background: #33415e;
  border-color: #3b4a68;
}

.terr__item--institutional {
  position: sticky;
  bottom: -8px;
  z-index: 1;
  margin: 8px -12px 0;
  padding: 8px 12px;
  background: #2a3750;
  border: 0;
  border-top: 1px solid #33415e;
  border-radius: 0;
}

.terr__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--ff-regular);
  color: var(--naa-para-text);
}
.terr__row:focus-visible {
  outline: 2px solid var(--naa-highlight-text);
  outline-offset: -2px;
}

.terr__badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--ff-bold);
  font-size: var(--font-size-12);
  color: #1c2638;
}

.terr__badge--outline {
  border: 1.5px solid #9ba1ac;
  color: var(--naa-para-text);
}

.terr__row-text {
  flex: 1;
  min-width: 0;
}

.terr__row-name {
  display: block;
  font-family: var(--ff-medium);
  font-size: var(--font-size-13);
  line-height: 1.2;
  color: var(--naa-title-text);
}

.terr__row-scope {
  font-family: var(--ff-regular);
  color: #9ba1ac;
}

.terr__row-rep {
  display: block;
  font-size: var(--font-size-12);
  color: #9ba1ac;
  margin-top: 2px;
}

.terr__row-rep--open {
  color: var(--naa-warning);
}

.terr__chevron {
  flex-shrink: 0;
  color: #9ba1ac;
  transition: transform 0.15s ease;
}

.terr__item--selected .terr__chevron {
  transform: rotate(180deg);
}

.terr__detail {
  padding: 2px 14px 12px 47px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.terr__contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-13);
  text-decoration: none;
  transition: color 0.15s ease;
}

.terr__contact-icon {
  flex-shrink: 0;
  color: #9ba1ac;
}

.terr__contact--tel {
  color: var(--naa-para-text);
}
.terr__contact--tel:hover {
  color: var(--naa-highlight-text);
}

.terr__contact--mail {
  color: var(--naa-highlight-text);
  word-break: break-all;
}
.terr__contact--mail:hover {
  text-decoration: underline;
}

.terr__states {
  font-size: var(--font-size-12);
  color: #9ba1ac;
  line-height: 1.5;
  margin: 0;
}

.terr__contacts {
  margin: 0 12px 12px;
  padding: 14px 14px 0;
  border-top: 1px solid #33415e;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terr__contacts-label {
  font-family: var(--ff-bold);
  font-size: var(--font-size-12);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #9ba1ac;
  margin: 0;
}

.terr__contacts-name {
  font-family: var(--ff-bold);
  font-size: var(--font-size-14);
  color: var(--naa-title-text);
  margin: 4px 0 0;
}

.terr__contacts-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 3px 0 0;
}
.terr__contacts-links a {
  font-size: var(--font-size-13);
  text-decoration: none;
  color: var(--naa-para-text);
}
.terr__contacts-links a:last-child {
  color: var(--naa-highlight-text);
  word-break: break-all;
}
.terr__contacts-links a:hover {
  text-decoration: underline;
}

.terr__disclosure {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 16px 0 0;
  font-family: var(--ff-light, var(--ff-regular));
  font-size: var(--font-size-12);
  color: var(--naa-para-text);
}

.terr__cc {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .terr {
    margin-left: 20px;
    margin-right: 20px;
  }
  .terr__layout {
    flex-direction: column;
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 24px;
  }
  .terr__map {
    padding: 20px 16px 0;
  }
  .terr__panel {
    width: 100%;
    border-left: 0;
    border-top: 1px solid #33415e;
  }
  .terr__list {
    max-height: 420px;
  }
}
@media (hover: none), (pointer: coarse) {
  .terr__tooltip {
    display: none;
  }
}
@media (max-width: 767px) {
  .terr__heading {
    font-size: 28px;
  }
  .terr__subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }
  .terr__layout {
    border-radius: 18px;
  }
  .terr__map {
    padding: 14px 10px 0;
  }
  .terr__detail {
    padding-left: 14px;
  }
  .terr__disclosure {
    justify-content: flex-start;
  }
  .terr__cc {
    margin-left: 0;
  }
}
