.school-directory {
  display: grid;
  gap: 10px;
  scroll-margin-top: 96px;
}

.directory-accordion {
  background: #fff;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  box-shadow: 0 7px 20px rgb(28 63 108 / 5%);
  overflow: hidden;
}

.directory-accordion > summary {
  display: grid;
  grid-template-columns: 1fr auto 28px;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px 10px 18px;
  border-left: 4px solid #2b6bc6;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.directory-accordion > summary::-webkit-details-marker {
  display: none;
}

.directory-accordion > summary small {
  margin-right: 10px;
  color: #6d7e96;
  font-size: 12px;
  font-weight: 600;
}

.directory-accordion > summary::after {
  content: "+";
  justify-self: center;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  color: var(--blue);
}

.directory-accordion[open] > summary::after {
  content: "−";
}

.directory-content {
  border-top: 1px solid #e0e8f2;
  padding: 22px 18px 12px;
}

.directory-featured-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.directory-featured-columns .directory-region + .directory-region {
  margin-top: 0;
}

.directory-featured-columns .directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-featured-group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.directory-featured-group-column .directory-group + .directory-group {
  margin-top: 10px;
}

.directory-featured-group-columns .directory-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.directory-featured-group-columns .directory-school {
  min-height: 34px;
  padding-block: 5px;
  font-size: 16px;
}

body[data-view="home"] .results-meta {
  display: none;
}

.directory-region + .directory-region {
  margin-top: 22px;
}

.directory-region h4 {
  margin: 0 0 12px;
  padding: 5px 10px;
  background: #e8f1fa;
  color: #24486e;
  font-size: 13px;
  font-weight: 700;
}

.directory-featured-kind > h4 {
  border-left: 4px solid #1764bd;
  background: #edf5fd;
  color: #173f70;
  font-size: 15px;
}

.directory-group + .directory-group {
  margin-top: 18px;
}

.directory-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 9px;
  padding: 0 2px 7px;
  border-bottom: 1px solid #dce7f3;
}

.directory-group-heading h5 {
  margin: 0;
  color: #173f70;
  font-size: 14px;
  font-weight: 700;
}

.directory-group-heading span {
  flex: none;
  color: #71839a;
  font-size: 11px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 14px;
}

.directory-school {
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #f6f7f9;
  color: #192844;
  line-height: 1.35;
  cursor: pointer;
}

.directory-school:hover,
.directory-school:focus-visible {
  border-color: var(--blue);
  outline: 0;
  background: var(--sky);
  color: #174d9b;
}

.directory-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.card-results-details {
  margin-top: 20px;
  border: 1px solid #d5e1ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 68 119 / 6%);
  overflow: hidden;
}

.card-results-details > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 15px 17px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.card-results-details > summary::-webkit-details-marker {
  display: none;
}

.summary-toggle {
  position: relative;
  width: 18px;
  height: 18px;
  margin-left: auto;
}

.summary-toggle::before,
.summary-toggle::after {
  position: absolute;
  top: 8px;
  left: 3px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  content: "";
}

.summary-toggle::after {
  transform: rotate(90deg);
  transition: transform .18s ease;
}

.card-results-details[open] .summary-toggle::after {
  transform: rotate(0);
}

.card-results-details .school-list {
  padding: 0 14px 14px;
}

.section-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #b8d3f6;
  border-radius: 6px;
  background: #edf5ff;
  color: var(--blue);
}

.list-icon::before {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 7px currentColor, 0 -7px currentColor;
  content: "";
  transform: translateX(-8px);
}

.list-icon::after {
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 7px currentColor, 0 -7px currentColor;
  content: "";
  transform: translateX(4px);
}

.section-title-with-icon {
  display: flex;
  align-items: center;
  gap: 13px;
}

.section-title-with-icon .eyebrow {
  margin-bottom: 5px;
}

.compare-icon::before,
.compare-icon::after {
  position: absolute;
  width: 8px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 2px;
  content: "";
}

.compare-icon::before {
  left: 7px;
  top: 7px;
}

.compare-icon::after {
  right: 7px;
  bottom: 7px;
  background: #fff;
}

.back-to-top {
  position: fixed;
  right: 0;
  bottom: 24px;
  z-index: 20;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #174f9f;
  border-radius: 6px;
  background: #1757b7;
  box-shadow: 0 8px 24px rgb(24 70 135 / 24%);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  outline: 3px solid rgb(37 99 235 / 22%);
  outline-offset: 2px;
  background: #0f469d;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#schools .section-head > p {
  max-width: none;
  white-space: nowrap;
}

#schools .section-head-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

body[data-view="home"] .catalog-layout {
  display: block;
}

body[data-view="home"] #schools {
  padding-top: 40px;
}

body[data-view="home"] #schools .section-head {
  margin-bottom: 20px;
}

body[data-view="home"] .filters {
  height: auto;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters > .filter-title .filter-search-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.filters > .filter-title .filter-search-button:hover,
.filters > .filter-title .filter-search-button:focus-visible {
  background: #174fbd;
}

@media (min-width: 841px) {
  body[data-view="home"] .home-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(390px, .85fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
  }

  body[data-view="home"] .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 18px;
  }

  body[data-view="home"] .filters > .filter-title {
    grid-column: 1 / -1;
    min-height: 43px;
    margin: 0;
    padding: 0 0 11px;
  }

  body[data-view="home"] .filters > fieldset,
  body[data-view="home"] .filters > .select-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body[data-view="home"] .filters > fieldset {
    display: flex;
    flex-direction: column;
  }

  body[data-view="home"] .filters > fieldset legend,
  body[data-view="home"] .filters > .select-field > span {
    min-height: 20px;
    margin: 0 0 8px;
    padding: 0;
  }

  body[data-view="home"] .filters .requirement-control,
  body[data-view="home"] .filters .eju-track-control,
  body[data-view="home"] .filters > .select-field select {
    width: 100%;
    margin: 0;
  }

  body[data-view="home"] .filters > .select-field select {
    min-height: 42px;
    padding: 8px 9px;
  }

  body[data-view="home"] .filters .eju-track-control span,
  body[data-view="home"] .filters .requirement-control span {
    min-height: 42px;
  }

  body[data-view="home"] .filters .eju-sample-note {
    margin-top: 5px;
  }

  body[data-view="schools"] .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 18px;
  }

  body[data-view="schools"] .filters > .filter-title {
    grid-column: 1 / -1;
    min-height: 43px;
    margin: 0;
    padding: 0 0 11px;
  }

  body[data-view="schools"] .filters > fieldset,
  body[data-view="schools"] .filters > .select-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body[data-view="schools"] .filters > fieldset {
    display: flex;
    flex-direction: column;
  }

  body[data-view="schools"] .filters > fieldset legend,
  body[data-view="schools"] .filters > .select-field > span {
    min-height: 20px;
    margin: 0 0 8px;
    padding: 0;
  }

  body[data-view="schools"] .filters .requirement-control,
  body[data-view="schools"] .filters .eju-track-control,
  body[data-view="schools"] .filters > .select-field select {
    width: 100%;
    margin: 0;
  }

  body[data-view="schools"] .filters > .select-field select {
    min-height: 42px;
    padding: 8px 9px;
  }

  body[data-view="schools"] .filters .eju-track-control span,
  body[data-view="schools"] .filters .requirement-control span {
    min-height: 42px;
  }

  body[data-view="schools"] .filters .eju-sample-note {
    margin-top: 5px;
  }

}

body[data-view="home"] .results {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

body[data-view="schools"] .home-control-row {
  display: block;
  margin-bottom: 18px;
}

body[data-view="schools"] .catalog-layout {
  display: block;
}

body[data-view="home"] .school-directory {
  flex: 1;
}

body[data-view="home"] .card-results-details,
body:not([data-view="compare"]) .compare-section {
  display: none;
}

body[data-view="schools"] .hero,
body[data-view="schools"] #schoolDirectory,
body[data-view="compare"] .hero,
body[data-view="compare"] #schools,
body[data-view="detail"] .hero,
body[data-view="detail"] #schools,
body[data-view="detail"] .compare-section {
  display: none;
}

body[data-view="schools"] .card-results-details {
  display: block;
  margin-top: 0;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

body[data-view="schools"] .card-results-details > summary {
  display: none;
}

body[data-view="schools"] .card-results-details .school-list {
  padding: 0;
}

body[data-view="compare"] .compare-section {
  display: block;
  min-height: calc(100vh - 76px);
}

.school-type-control {
  margin-top: 12px;
}

.school-type-control span {
  min-height: 42px;
  font-size: 13px;
}

.school-type-control input {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: auto;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  #schools .section-head > p {
    white-space: normal;
  }

  .filters .school-type-filter {
    grid-column: 1 / -1;
  }

  .directory-accordion > summary {
    min-height: 46px;
    font-size: 15px;
  }

  .directory-content {
    padding: 17px 8px 8px;
  }

  .directory-featured-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .directory-school {
    min-height: 44px;
    font-size: 13px;
  }

  body[data-view="home"] .home-control-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }

  body[data-view="home"] .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding: 16px;
  }

  body[data-view="home"] .filters > .filter-title {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  body[data-view="home"] .filters > fieldset,
  body[data-view="home"] .filters > .select-field,
  body[data-view="home"] .filters > .eju-track-filter,
  body[data-view="home"] .filters > .sgu-filter,
  body[data-view="home"] .filters > .english-filter {
    grid-column: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body[data-view="home"] .filters > fieldset legend,
  body[data-view="home"] .filters > .select-field > span {
    min-height: 20px;
    margin: 0 0 7px;
  }

  body[data-view="home"] .filters > .select-field select {
    min-height: 42px;
    margin: 0;
    padding: 8px;
  }

  body[data-view="schools"] .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding: 16px;
  }

  body[data-view="schools"] .filters > .filter-title {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  body[data-view="schools"] .filters > fieldset,
  body[data-view="schools"] .filters > .select-field,
  body[data-view="schools"] .filters > .eju-track-filter,
  body[data-view="schools"] .filters > .sgu-filter,
  body[data-view="schools"] .filters > .english-filter {
    grid-column: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body[data-view="schools"] .filters > fieldset legend,
  body[data-view="schools"] .filters > .select-field > span {
    min-height: 20px;
    margin: 0 0 7px;
  }

  body[data-view="schools"] .filters > .select-field select {
    min-height: 42px;
    margin: 0;
    padding: 8px;
  }

  .back-to-top {
    right: 0;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}
