.pe-cover {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(8, 43, 85, 0.6);
  padding: 20px;
  display: grid;
  place-items: center;
}
.pe-cover[hidden] {
  display: none !important;
}
.pe-dialog {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #183350;
  background: #f4f8fc;
  border-radius: 14px;
  width: min(1120px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 70px #00152855;
  overflow: hidden;
}
.pe-head,
.pe-foot {
  padding: 16px 22px;
  background: #fff;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.pe-head {
  border-bottom: 1px solid #d2dee9;
}
.pe-head h2 {
  margin: 0;
  font-size: 22px;
}
.pe-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #5c7288;
}
.pe-body {
  padding: 20px 22px;
  overflow: auto;
  min-height: 0;
}
.pe-foot {
  border-top: 1px solid #d2dee9;
}
.pe-foot .pe-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pe-notice {
  padding: 12px 14px;
  border: 1px solid #bbd7ed;
  background: #eaf4fc;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.pe-error {
  color: #8e2925;
  background: #fff0ee;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
}
.pe-error:empty {
  display: none;
}
.pe-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.pe-fields label {
  font-size: 12px;
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}
.pe-fields input,
.pe-fields textarea,
.pe-fields select {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #91a9c0;
  border-radius: 7px;
  padding: 11px;
  font: inherit;
  background: #fff;
  color: #183350;
}
.pe-card {
  background: #fff;
  border: 1px solid #d2dee9;
  border-radius: 10px;
  margin: 14px 0;
  overflow: hidden;
}
.pe-card-head {
  padding: 12px 14px;
  background: #eaf4fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.pe-card-head h3 {
  margin: 0;
  font-size: 15px;
}
.pe-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.pe-content {
  padding: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.pe-content .pe-stimulus {
  padding: 12px;
  border-left: 3px solid #3196e6;
  background: #f4f8fc;
  margin-bottom: 14px;
  white-space: pre-wrap;
}
.pe-question {
  padding: 10px 0;
}
.pe-question + .pe-question {
  border-top: 1px dashed #d2dee9;
}
.pe-text {
  white-space: pre-wrap;
}
.pe-part {
  border-top: 1px dashed #d2dee9;
  padding: 10px 0;
  margin-top: 8px;
}
.pe-options {
  padding-left: 28px;
  list-style-type: upper-alpha;
}
.pe-options li {
  padding: 4px;
}
.pe-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.pe-figures figure {
  margin: 0;
  padding: 12px;
  border: 1px solid #d2dee9;
  border-radius: 8px;
}
.pe-figures img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  margin: auto;
}
.pe-figures figcaption {
  font-size: 12px;
  color: #5c7288;
  margin-top: 8px;
}
.pe-table {
  overflow: auto;
  margin: 12px 0;
}
.pe-table table {
  width: 100%;
}
.pe-dialog button {
  font-family: inherit;
}
.pe-dialog :focus-visible {
  outline: 3px solid #3196e6;
  outline-offset: 2px;
}
#peStatus {
  font-size: 13px;
  font-weight: 700;
}
#peTotals {
  font-size: 14px;
}
#peReload[hidden] {
  display: none;
}
.pe-cover .btn {
  min-height: 40px;
}
.pe-cover button:disabled {
  opacity: 0.5;
}
.pe-working {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
@media (max-width: 700px) {
  .pe-cover {
    padding: 0;
  }
  .pe-dialog {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
  .pe-head,
  .pe-foot {
    padding: 12px;
  }
  .pe-body {
    padding: 12px;
  }
  .pe-head h2 {
    font-size: 19px;
  }
  .pe-foot .pe-actions {
    width: 100%;
  }
  .pe-foot button {
    flex: 1;
  }
  .pe-card-head,
  .pe-content {
    padding: 12px;
  }
  .pe-content {
    font-size: 14px;
  }
}

.pe-availability {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pe-fields select {
  width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 8px;
  border: 1.5px solid #91a9c0;
  border-radius: 7px;
  background: #fff;
  color: #183350;
}
@media (max-width: 700px) {
  .pe-availability {
    grid-template-columns: 1fr;
  }
}
