  ol.grid {
  list-style: none;
  margin: 0;
}
.subject {
  border-radius: 3px;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  overflow: hidden;
  text-decoration-thickness: 2px;
}
.subject_image {
  overflow: hidden;
}
.subject_image img {
  display: block;
  transition: transform .15s ease 50ms;
  width: 100%;
}
.subject_content {
  background: var(--lighter-grey);
  padding: 1.25em 1em;
  transition: background .2s ease;
  will-change: background;
}

.subject:focus img,
.subject:hover img {
  transform: scale(1.1);
}

.subject:focus .subject_content,
.subject:hover .subject_content {
  color: #fff;
  background: var(--blue);
}


#subject-content dl a,
#related-subjects-list a {
  display: inline-block;
  padding-block: .2em;
  padding-inline: 0 .3em;
  text-decoration-thickness: 2px;
}
#subject-content dl a:focus,
#subject-content dl a:hover,
#related-subjects-list a:focus,
#related-subjects-list a:hover {
  text-decoration: none;
}

#subject-content {
  padding-block-start: 0;
}

#subject-content .button {
  width: 100%;
}

#related-subjects-list a {
  margin-block-end: .1em;
}



@media screen and (min-width: 40em) {
  #subject-content {
    display: grid;
    gap: 0 2em;
    grid-template-columns: 1fr 10em;
  }
  #subject-content h3 {
    grid-column: 1/-1;
  }
  #subject-content dl {
    grid-column: 2;
    grid-row: 2/5;
  }
  #subject-content .button {
    justify-self: start;
    width: auto;
  }

  #related-subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5em .8em;
    list-style: none;
    margin: 0;
  }
}


/* Foundation reveal  */
@media print, screen and (min-width: 40em) {
  .reveal.large, .reveal.small, .reveal.tiny, .reveal {
    right: auto;
    left: auto;
    margin: 0 auto;
  }
}
html.is-reveal-open {
  position: fixed;
  width: 100%;
  overflow-y: hidden;
}
html.is-reveal-open.zf-has-scroll {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}
html.is-reveal-open body {
  overflow-y: hidden;
}

.reveal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1005;
  display: none;
  background-color: rgba(37, 37, 37, 0.45);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.reveal {
  z-index: 1006;
  backface-visibility: hidden;
  display: none;
  padding: 0;
  border: 1px solid #cacaca;
  border-radius: 0;
  background-color: #ffffff;
  position: relative;
  top: 100px;
  margin-right: auto;
  margin-left: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
[data-whatinput=mouse] .reveal {
  outline: 0;
}
@media print, screen and (min-width: 40em) {
  .reveal {
    min-height: 0;
  }
}
.reveal .column {
  min-width: 0;
}
.reveal > :last-child {
  margin-bottom: 0;
}
@media print, screen and (min-width: 40em) {
  .reveal {
    width: 47.25rem;
    max-width: 75rem;
  }
}
.reveal.collapse {
  padding: 0;
}
@media print, screen and (min-width: 40em) {
  .reveal.tiny {
    width: 30%;
    max-width: 75rem;
  }
}
@media print, screen and (min-width: 40em) {
  .reveal.small {
    width: 50%;
    max-width: 75rem;
  }
}
@media print, screen and (min-width: 40em) {
  .reveal.large {
    width: 90%;
    max-width: 75rem;
  }
}
.reveal.full {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  margin-left: 0;
  border: 0;
  border-radius: 0;
}
@media print, screen and (max-width: 39.99875em) {
  .reveal {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100%;
    margin-left: 0;
    border: 0;
    border-radius: 0;
  }
}
.reveal.without-overlay {
  position: fixed;
}

.ais-SearchBox-form {
  display: grid;
}
.ais-SearchBox-form * {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.ais-SearchBox-form button {
  align-self: center;
  justify-self: end;
  padding: .25em 1em;
}

details:has(.filters) summary {
  font-size: 1.35em;
  margin-block-end: .25em;
}

.filters {
  display: grid;
  gap: 1em;
}

.filters ul {
  font-size: 1em;
  list-style: none;
  margin: 0;
}
.ais-RefinementList-item {
  padding-block-start: 0.15em;
  padding-block-end: 0.15em;
}
.ais-RefinementList-label {
  align-items: baseline;
  display: grid;
  gap: .3em;
  grid-template-columns: repeat(3,auto);
  justify-content: start;
  line-height: 1.2;
  transition: opacity .2s ease;
  opacity: .85;
}
.ais-RefinementList-label:has(input:checked),
.ais-RefinementList-label:hover,
.ais-RefinementList-label:focus {
  opacity: 1;
}

input.ais-RefinementList-checkbox {
  margin: 0;
  position: relative;
  top: 2px;
}

.ais-RefinementList-count {
  font-size: .8em;
  opacity: .8;
}
.ais-RefinementList-count::before {
  content: "(";
}
.ais-RefinementList-count::after {
  content: ")";
}

.ais-Stats {
  font-size: .9em;
  margin-block-start: 1em;
  margin-block-end: 1em;
  text-align: end;
}



@media screen and (min-width: 40em) {
  .filters {
    gap: 2em;
    grid-template-columns: 10em 22em auto;
  }
  .sas.filters {
    grid-template-columns: repeat(3, 1fr);
  }
  .sas-hajim.filters {
    grid-template-columns: repeat(4, auto);
  }
}

@media screen and (min-width: 64em) {
  .sas-hajim.filters {
    grid-template-columns: 10em 8em 12em auto;
  }
}
