:has(h1[id="glossary"]) {
  .bs-sidebar {
    max-height: 80vh;
    overflow: scroll;
  }

  input[type="search"] {
    margin-bottom: 1em;
    width: 100%;
    padding: 0.5em;
    font-size: 1em;
  }
}

.glossary-table {
  th[scope="row"] {
    width: 35%;

    h3 {
      font-size: 120%;
      margin: 0;
      line-height: 1.5;
    }
  }

  td:last-child {
    max-width: 30ch;
  }

  tr:target, tr:has(:target) {
    display: table-row;

    h3 {
      background: linear-gradient(120deg, rgba(from var(--uc-gold-color) r g b / 30%));
      background-size: 100% 50%;
      background-position: 50% 50%;
      background-repeat: no-repeat;
      font-weight: 600;
    }
  }

  details {
    summary {
      cursor: pointer;
      display: flex;
      gap: .5em;

      &::before {
        content: "▶";
        align-self: baseline;
        font-size: 80%;
        transform: rotate(0deg);
        transform-origin: 50% 50%;
        transition: transform 0.2s ease;
      }

      > p {
        margin: 0;
      }
    }

    &[open] summary::before {
      transform: rotate(90deg);
    }
  }
}
