.directory-body {
  --directory-green: #18b77f;
  --directory-green-dark: #0e9f6c;
  --directory-green-soft: #c4e1c4;
  --directory-page: #f5f5f5;
  --directory-panel: #fefefe;
  --directory-line: #ececec;
  --directory-table-line: #777;
  color: #555;
  background: var(--directory-page);
}

.directory-button {
  display: inline-grid;
  min-width: 0;
  height: 30px;
  padding: 0 14px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0;
  background: #fff;
  font-size: 12px;
  line-height: 28px;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.directory-button--primary {
  color: #fff;
  border-color: var(--directory-green);
  background: var(--directory-green);
}

.directory-button--primary:hover {
  border-color: var(--directory-green-dark);
  background: var(--directory-green-dark);
}

.directory-button--reset {
  color: #44be82;
  border-color: #d4efdc;
  background: #d4efdc;
}

.directory-button--outline {
  color: var(--directory-green);
  border-color: var(--directory-green);
  background: #fff;
}

.directory-main--schools {
  min-height: 0;
}

.directory-schools-content {
  min-height: 0;
}

.directory-page--schools .home-qr,
.directory-page--schools .home-social {
  display: none;
}

.directory-hero {
  position: relative;
  display: grid;
  height: 163px;
  margin-top: 5px;
  overflow: hidden;
  place-items: center;
  border-radius: 3px;
  background:
    radial-gradient(circle at 8% 100%, rgb(255 255 255 / 30%) 0 54px, transparent 55px),
    radial-gradient(circle at 94% 32%, rgb(255 255 255 / 23%) 0 46px, transparent 47px),
    linear-gradient(180deg, #9fe5b1 0%, #d9f1df 100%);
}

.directory-hero::before,
.directory-hero::after {
  position: absolute;
  width: 84px;
  height: 42px;
  border: 14px solid rgb(70 194 126 / 14%);
  content: "";
  transform: rotate(-18deg) skewX(-12deg);
}

.directory-hero::before {
  bottom: -12px;
  left: 72px;
}

.directory-hero::after {
  top: 40px;
  right: 62px;
  transform: rotate(20deg) skewX(12deg);
}

.directory-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0 20px 16px 0;
  color: #fff;
  font-size: 57px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.155em;
  line-height: 1;
  paint-order: stroke fill;
  -webkit-text-stroke: 12px #1db278;
}

.directory-schools-layout {
  min-height: 0;
  align-items: start;
  margin-top: 16px;
  grid-template-columns: minmax(0, 868px) 323px;
  gap: 23px;
}

.directory-school-panel {
  min-width: 0;
  min-height: 0;
  padding: 22px 24px 24px;
  border-radius: 16px;
  background: var(--directory-panel);
}

.directory-filter {
  min-width: 0;
}

.directory-search-row {
  display: flex;
  width: 344px;
  height: 44px;
  align-items: stretch;
  gap: 8px;
}

.directory-search-row input {
  width: 190px;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #e6f0eb;
  color: #555;
  background: #fff;
  font-size: 13px;
}

.directory-search-row input::placeholder {
  color: #d0d0d0;
}

.directory-search-row .directory-button {
  width: 69px;
  height: 44px;
  padding: 0;
  font-size: 13px;
  line-height: 42px;
}

.directory-filter-row {
  position: relative;
  display: block;
  min-width: 0;
  margin: 15px 0 0;
  padding: 0 0 0 90px;
  border: 0;
}

.directory-filter-row:first-of-type {
  margin-top: 19px;
}

.directory-filter-row>legend {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  float: none;
  width: 87px;
  height: 25px;
  padding: 0;
  color: #4f4f4f;
  font-size: 15px;
  line-height: 25px;
}

.directory-filter-options {
  display: flex;
  width: 100%;
  max-width: 723px;
  min-width: 0;
  min-height: 25px;
  flex-wrap: wrap;
  gap: 15px 18px;
}

.directory-filter-option {
  position: relative;
  display: inline-flex;
  min-width: 56px;
  height: 25px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  color: #555;
  background: #eee;
  font-size: 15px;
  line-height: 25px;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition);
}

.directory-filter-option:hover,
.directory-filter-option:focus-within {
  color: var(--directory-green-dark);
  background: #e0f3e6;
}

.directory-filter-option.is-active,
.directory-filter-option:has(input:checked) {
  color: #20c06f;
  background: var(--directory-green-soft);
}

.directory-filter-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.directory-school-results {
  display: grid;
  margin-top: 25px;
  grid-template-columns: repeat(2, minmax(0, 389px));
  gap: 20px;
}

.directory-school-panel [data-directory-results]>.portal-empty,
.directory-school-panel [data-directory-status]:not([hidden]) {
  margin: 24px 0 0;
  padding: 24px 20px;
  border: 1px solid #e5ebe7;
  border-radius: 10px;
  background: #fff;
  color: #727c76;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

.directory-school-card {
  min-width: 0;
  height: 176px;
  overflow: hidden;
  border: 1px solid #c9ddd2;
  border-radius: 8px;
  background: #fff;
}

.directory-school-card__summary {
  display: grid;
  height: 122px;
  padding: 15px 14px 13px;
  grid-template-columns: 64px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
}

.directory-school-card__logo {
  width: 64px;
  height: 64px;
  padding: 5px;
  border: 1px solid #aaa;
  border-radius: 50%;
  object-fit: contain;
}

.directory-school-card__info {
  min-width: 0;
}

.directory-school-card__info h3 {
  margin: 0 0 12px;
  overflow: hidden;
  color: #333;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-school-card__info p {
  margin: 0;
  overflow: hidden;
  color: #d6d6d6;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-school-card__enter {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #999;
  background: #f0f0f0;
  font-size: 24px;
  line-height: 1;
}

.directory-school-card__enter:hover {
  color: #fff;
  background: var(--directory-green);
}

.directory-school-card__links {
  display: grid;
  height: 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #eee;
}

.directory-school-card__links a {
  display: flex;
  min-width: 0;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  color: #666;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-school-card__links span {
  color: #4fd59c;
  font-size: 18px;
}

.directory-school-rail {
  display: grid;
  gap: 12px;
}

.directory-school-rail>section {
  min-width: 0;
  overflow: hidden;
  background: #fff;
}

.directory-ranking-panel {
  height: 348px;
}

.directory-ranking-panel .portal-section-heading,
.directory-link-panel .portal-section-heading {
  height: 53px;
  padding: 0 18px 0 11px;
  border-bottom: 0;
}

.directory-ranking-panel .portal-section-heading h2,
.directory-link-panel .portal-section-heading h2 {
  padding-left: 20px;
  font-size: 21px;
  line-height: 25px;
}

.directory-ranking-panel .portal-section-heading h2::before,
.directory-link-panel .portal-section-heading h2::before {
  width: 7px;
  height: 25px;
  border-radius: 3px;
}

.directory-ranking-panel .portal-section-heading h2 span {
  color: var(--directory-green);
}

.directory-ranking-list {
  padding: 0 11px;
}

.directory-ranking-list li {
  display: grid;
  height: 54.5px;
  grid-template-columns: 22px 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eee;
  color: #444;
  font-size: 14px;
}

.directory-ranking-list li>span {
  color: #1bbb80;
  font-weight: 600;
}

.directory-ranking-list li:first-child>span {
  color: #ef343e;
}

.directory-ranking-list img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.directory-ranking-list a {
  padding-left: 11px;
}

.directory-ranking-list a,
.directory-link-panel li a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-link-panel:nth-of-type(3) {
  height: 365px;
}

.directory-link-panel:nth-of-type(4) {
  height: 354px;
}

.directory-link-panel ul {
  padding: 3px 11px 0;
}

.directory-link-panel li {
  height: 28.5px;
  overflow: hidden;
  color: #737373;
  font-size: 14px;
  line-height: 28.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-schools-content>.directory-friend-section {
  position: static;
  height: 103px;
  margin-top: 28px;
  padding: 0 2px;
}

.directory-main--data {
  min-height: 1738px;
}

.directory-data-content {
  min-height: 1729px;
}

.directory-data-layout {
  height: 1200px;
  margin-top: 11px;
  grid-template-columns: minmax(0, 831px) 355px;
  gap: 26px;
}

.directory-data-panel {
  min-width: 0;
  height: 1200px;
  padding: 0 17px;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  background: #fff;
}

.directory-data-heading {
  height: 36px;
  padding: 0;
  border-bottom: 0;
}

.directory-data-heading h2 {
  padding-left: 14px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.directory-data-heading h2::before {
  width: 5px;
  height: 25px;
  border-radius: 2px;
}

.directory-data-heading h2 span,
.directory-data-heading>a span {
  color: var(--directory-green);
}

.directory-data-heading>a {
  color: #666;
  font-size: 12px;
}

.directory-page--admissions .directory-data-heading {
  height: 41px;
  padding-top: 5px;
}

@media (min-width: 769px) {
  .directory-page--data .home-search {
    width: 300px;
    height: 40px;
    grid-template-columns: minmax(0, 1fr) 72px;
    border-color: #dbeae3;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgb(24 114 83 / 8%);
  }

  .directory-page--data .home-search input,
  .directory-page--data .home-search button {
    height: 38px;
  }

  .directory-page--data .home-search input {
    padding: 0 14px;
    font-size: 14px;
  }

  .directory-page--data .home-search button {
    color: #fff;
    background: var(--home-green);
    font-size: 13px;
    font-weight: 600;
    transition: background-color var(--transition);
  }

  .directory-page--data .home-search button:hover,
  .directory-page--data .home-search button:focus-visible {
    background: var(--home-green-dark);
  }

  .directory-page--data .home-search:focus-within {
    border-color: var(--home-green);
    box-shadow: 0 0 0 3px rgb(28 178 120 / 18%);
  }
}

.directory-data-toolbar {
  display: flex;
  width: 100%;
  height: 38px;
  margin-top: 8px;
  align-items: stretch;
}

.directory-data-fields {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 7px;
}

.directory-data-fields select,
.directory-data-fields input {
  width: 122px;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #dfeae5;
  border-radius: 4px;
  color: #777;
  background: #fff;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.directory-data-fields select {
  padding-right: 20px;
}

.directory-data-fields input::placeholder {
  color: #aebbb5;
}

.directory-data-fields select:focus-visible,
.directory-data-fields input:focus-visible {
  border-color: var(--directory-green);
  box-shadow: 0 0 0 3px rgb(24 183 127 / 16%);
}

.directory-data-actions {
  display: flex;
  margin-left: auto;
  gap: 8px;
}

.directory-data-actions .directory-button {
  width: 60px;
  height: 38px;
  padding: 0;
  border-radius: 4px;
  font-size: 13px;
  line-height: 36px;
}

@media (min-width: 769px) {
  .directory-data-fields input[name="school"] {
    width: 145px;
  }

  .directory-data-fields input[name="code"] {
    width: 122px;
  }
}

.directory-data-table-wrap {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
}

.directory-page--admissions .directory-data-table-wrap {
  margin-top: 16px;
}

.directory-data-table {
  width: 100%;
  min-width: 796px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #444;
  background: #fff;
  font-size: 12px;
  line-height: 1.1;
}

.directory-data-table th,
.directory-data-table td {
  min-width: 0;
  height: 18px;
  padding: 0 3px;
  overflow: hidden;
  border: 1px solid var(--directory-table-line);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-data-table th {
  color: #333;
  background: #d8d8d8;
  font-size: 12px;
  font-weight: 600;
}

.directory-score-table thead tr:first-child th {
  height: 18px;
}

.directory-score-table thead tr:last-child th {
  height: 18px;
}

.directory-admission-table thead tr:first-child th {
  height: 30px;
}

.directory-admission-table thead tr:last-child th {
  height: 27px;
  line-height: 1.2;
  white-space: normal;
}

.directory-score-table tbody td,
.directory-admission-table tbody td {
  height: 32px;
  padding: 6px 3px;
  line-height: 1.6;
}

.directory-page--dispatch .directory-data-table {
  font-size: 12px;
  line-height: 1.25;
}

.directory-page--dispatch .directory-data-table th {
  font-size: 12px;
}

.directory-page--dispatch .directory-admission-table thead tr:first-child th {
  height: 30px;
}

.directory-page--dispatch .directory-admission-table thead tr:last-child th {
  height: 27px;
  line-height: 1.2;
  white-space: normal;
}

.directory-page--dispatch .directory-main--data,
.directory-page--dispatch .directory-data-content {
  min-height: 0;
}

.directory-page--dispatch .directory-data-layout,
.directory-page--dispatch .directory-data-panel {
  height: auto;
}

.directory-page--dispatch .directory-lower-grid {
  margin-top: 28px;
}

.directory-page--dispatch .directory-data-friend {
  position: static;
  height: 103px;
  margin-top: 28px;
}

.directory-page--scores .directory-main--data,
.directory-page--scores .directory-data-content {
  min-height: 0;
}

.directory-page--scores .directory-data-layout,
.directory-page--scores .directory-data-panel {
  height: auto;
}

.directory-page--scores .directory-lower-grid {
  margin-top: 28px;
}

.directory-page--scores .directory-data-friend {
  position: static;
  height: 103px;
  margin-top: 28px;
}

.directory-data-table tbody tr:hover {
  background: #f5fbf8;
}

.directory-data-table td a {
  display: block;
  overflow: hidden;
  color: #444;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-data-table td a:hover {
  color: var(--directory-green-dark);
}

.directory-score-table td:nth-child(3),
.directory-admission-table td:nth-child(3),
.directory-data-table td a[data-field="schoolName"] {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.directory-data-rail {
  display: grid;
  padding-top: 26px;
  align-content: start;
  gap: 14px;
}

.portal-rail>.directory-hot-panel {
  height: 248px;
  overflow: hidden;
  background: transparent;
}

.directory-hot-panel .portal-section-heading {
  height: 25px;
  padding: 0;
  border-bottom: 0;
}

.directory-hot-panel .portal-section-heading h2 {
  padding-left: 20px;
  font-size: 19px;
  font-weight: 600;
  line-height: 25px;
}

.directory-hot-panel .portal-section-heading h2::before {
  width: 7px;
  height: 25px;
  border-radius: 3px;
}

.directory-hot-panel ul {
  height: 204px;
  margin-top: 18px;
  padding: 0 10px;
  background: #fff;
}

.directory-hot-panel li {
  height: 51px;
  overflow: hidden;
  color: #6b6b6b;
  font-size: 17px;
  line-height: 51px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-hot-panel li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-data-rail .portal-topic-ads {
  gap: 12px;
}

.directory-lower-grid {
  display: grid;
  width: 804px;
  height: 217px;
  margin-top: 48px;
  grid-template-columns: 380px 389px;
  gap: 35px;
}

.directory-lower-panel {
  min-width: 0;
  overflow: hidden;
}

.directory-lower-panel .portal-section-heading {
  height: 40px;
  padding: 0;
  border-bottom: 0;
}

.directory-lower-panel .portal-section-heading h2 {
  padding-left: 15px;
  color: #333;
  font-size: 17px;
  font-weight: 600;
}

.directory-lower-panel .portal-section-heading h2::before {
  height: 23px;
  border-radius: 2px;
}

.directory-lower-panel .portal-section-heading>a {
  font-size: 21px;
  font-weight: 600;
}

.directory-lower-panel ul {
  padding-top: 8px;
}

.directory-lower-panel li {
  height: 28px;
  overflow: hidden;
  color: #555;
  font-size: 13px;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-lower-panel li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-data-friend {
  margin: 0;
}

@media (max-width: 1024px) {

  .directory-main--schools,
  .directory-main--data,
  .directory-schools-content,
  .directory-data-content {
    min-height: 0;
  }

  .directory-hero {
    height: 140px;
    margin-top: 0;
  }

  .directory-schools-layout,
  .directory-data-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-school-panel,
  .directory-data-panel {
    height: auto;
    min-height: 0;
  }

  .directory-filter-options {
    max-width: none;
  }

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

  .directory-ranking-panel,
  .directory-link-panel:nth-of-type(3),
  .directory-link-panel:nth-of-type(4) {
    height: auto;
    min-height: 310px;
  }

  .directory-data-rail {
    padding-top: 0;
  }

  .directory-data-panel {
    padding-bottom: 28px;
  }

  .directory-lower-grid {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .directory-hero {
    height: 112px;
  }

  .directory-hero h2 {
    font-size: 29px;
    text-align: center;
  }

  .directory-school-panel {
    padding: 18px 16px;
    border-radius: 8px;
  }

  .directory-search-row {
    width: 100%;
    height: auto;
    flex-wrap: wrap;
  }

  .directory-search-row input {
    width: 100%;
    font-size: 16px;
  }

  .directory-search-row .directory-button {
    width: calc(50% - 4px);
    min-height: 44px;
  }

  .directory-filter-row {
    padding-left: 0;
  }

  .directory-filter-row>legend {
    position: static;
    width: 100%;
    min-height: 36px;
    height: auto;
    padding-top: 8px;
  }

  .directory-filter-options {
    gap: 8px;
  }

  .directory-filter-option {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
    line-height: 44px;
  }

  .directory-school-results,
  .directory-school-rail,
  .directory-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-school-card {
    height: auto;
    min-height: 174px;
  }

  .directory-school-card__links a {
    min-height: 52px;
  }

  .directory-data-panel {
    padding: 10px 14px 24px;
  }

  .directory-data-heading {
    height: auto;
    min-height: 58px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .directory-page--admissions .directory-data-heading {
    height: auto;
    padding-top: 0;
  }

  .directory-data-toolbar {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

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

  .directory-data-fields select,
  .directory-data-fields input {
    width: 100%;
    height: 44px;
    padding-inline: 12px;
    font-size: 16px;
  }

  .directory-data-fields input:last-child {
    grid-column: 1 / -1;
  }

  .directory-data-actions {
    margin-left: 0;
    gap: 10px;
  }

  .directory-data-actions .directory-button {
    width: auto;
    min-height: 44px;
    flex: 1;
  }

  .directory-data-table-wrap,
  .directory-page--admissions .directory-data-table-wrap {
    margin-top: 18px;
    padding-bottom: 8px;
  }

  .portal-rail>.directory-hot-panel {
    height: auto;
  }

  .directory-hot-panel ul {
    height: auto;
  }

  .directory-hot-panel li {
    min-height: 44px;
    height: auto;
    line-height: 1.5;
    padding-block: 11px;
    white-space: normal;
  }

  .directory-lower-grid {
    margin-top: 28px;
    gap: 20px;
  }

  .directory-lower-panel li {
    min-height: 38px;
    height: auto;
    line-height: 1.5;
    padding-block: 8px;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .directory-data-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-data-fields input:last-child {
    grid-column: auto;
  }

  .directory-school-card__summary {
    grid-template-columns: 56px minmax(0, 1fr) 28px;
    gap: 12px;
  }

  .directory-school-card__logo {
    width: 56px;
    height: 56px;
  }

  .directory-school-card__links span {
    display: none;
  }
}