.wer-glossary-note {
  padding: 14px 17px;
  border: 1px solid #e3e6ef;
  border-radius: 12px;
  background: #f7f9ff;
  color: #3d4454;
  font-size: 15px;
  line-height: 1.55;
}

.wer-glossary-note .wer-term {
  font-weight: 700;
}

.wer-glossary {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #080a10;
  box-shadow: 0 28px 90px rgba(8, 10, 16, .28);
}

.wer-glossary::backdrop {
  background: rgba(8, 10, 16, .66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.wer-glossary[open] {
  animation: wer-glossary-in .16s ease-out;
}

.wer-glossary-panel {
  position: relative;
  max-height: calc(100vh - 32px);
  padding: 30px 34px 32px;
  overflow-y: auto;
}

.wer-glossary-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #e3e6ef;
  border-radius: 50%;
  background: #fff;
  color: #3d4454;
  font: inherit;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.wer-glossary-close:hover {
  border-color: #2a52e2;
  color: #2a52e2;
}

.wer-glossary-close:focus-visible,
.wer-term:focus-visible {
  outline: 3px solid rgba(42, 82, 226, .32);
  outline-offset: 3px;
}

.wer-glossary-title {
  margin: 0 52px 8px 0;
  color: #080a10;
  font-family: "Golos Text", -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.wer-glossary-formula {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 14px;
}

.wer-glossary-formula code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(42, 82, 226, .08);
  color: #1f43c3;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.wer-glossary-list {
  margin: 0;
}

.wer-glossary-list > div {
  padding: 18px 0;
  border-top: 1px solid #e9ebf2;
}

.wer-glossary-list dt {
  margin: 0 0 5px;
  color: #080a10;
  font-size: 18px;
  font-weight: 700;
}

.wer-glossary-list dd {
  margin: 0;
  color: #3d4454;
  font-size: 16px;
  line-height: 1.6;
}

@keyframes wer-glossary-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
}

@media (max-width: 640px) {
  .wer-glossary-note {
    padding: 12px 14px;
    font-size: 14.5px;
  }

  .wer-glossary {
    width: min(100% - 20px, 680px);
    max-height: calc(100% - 20px);
    border-radius: 15px;
  }

  .wer-glossary-panel {
    max-height: calc(100vh - 20px);
    padding: 24px 20px 22px;
  }

  .wer-glossary-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .wer-glossary-title {
    margin-right: 46px;
    font-size: 25px;
  }

  .wer-glossary-list > div {
    padding: 15px 0;
  }

  .wer-glossary-list dd {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wer-glossary[open] {
    animation: none;
  }
}
