.at-directory,
.at-directory * {
  box-sizing: border-box;
}

.at-directory {
  --directory-ink: #14171a;
  --directory-muted: #60666e;
  --directory-line: #dfe2e5;
  --directory-soft: #f5f6f7;
  --directory-yellow: #ffc400;
  padding: 34px 0 72px;
  color: var(--directory-ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.at-directory-shell {
  width: min(calc(100% - 48px), 1600px);
  margin-inline: auto;
}

.at-directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-bottom: 36px;
}

.at-directory h1 {
  max-width: 820px;
  margin: 0;
  color: var(--directory-ink);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.at-title-line {
  display: block;
  width: 58px;
  height: 4px;
  margin-top: 13px;
  background: var(--directory-yellow);
}

.at-directory-lead {
  max-width: 620px;
  margin: 20px 0 0;
  color: #42474e;
  font-size: 16px;
  line-height: 1.65;
}

.at-directory-summary {
  display: flex;
  gap: 22px;
  align-items: center;
  padding-bottom: 4px;
}

.at-directory-summary p {
  margin: 0;
  color: var(--directory-muted);
  white-space: nowrap;
  font-size: 14px;
}

.at-directory-summary strong {
  color: var(--directory-ink);
  font-size: 16px;
}

.at-view-switch {
  display: flex;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--directory-line);
  border-radius: 5px;
}

.at-view-switch > :where(a, span) {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 16px;
  color: #555b62;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.at-view-switch > :where(a, span) + :where(a, span) {
  border-left: 1px solid var(--directory-line);
}

.at-view-switch .is-active {
  color: var(--directory-ink);
  background: #fafaf8;
}

.at-view-switch svg {
  width: 18px;
  height: 18px;
}

.at-view-switch i {
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.at-directory-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.at-directory-filter {
  position: sticky;
  top: 20px;
  overflow: hidden;
  border: 1px solid var(--directory-line);
  border-radius: 5px;
  background: #fff;
}

.at-directory-filter > summary {
  display: none;
}

.at-filter-section {
  padding: 20px 20px 18px;
}

.at-filter-section + .at-filter-section,
.at-directory-filter form .at-filter-section:first-child {
  border-top: 1px solid var(--directory-line);
}

.at-filter-section h2 {
  margin: 0 0 14px;
  color: var(--directory-ink);
  font-size: 15px;
  line-height: 1.25;
}

.at-filter-categories nav {
  display: grid;
  gap: 2px;
}

.at-category-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 9px;
  color: #353a40;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
}

.at-category-link:hover {
  background: #f7f7f5;
}

.at-category-link.is-active {
  color: var(--directory-ink);
  background: #f2f3f4;
  font-weight: 750;
}

.at-category-link small {
  flex: 0 0 auto;
  color: #727880;
  font-size: 11px;
}

.at-category-link.is-active small {
  color: #b78600;
  font-weight: 800;
}

.at-field {
  display: block;
  margin-bottom: 14px;
}

.at-field:last-child {
  margin-bottom: 0;
}

.at-field > span {
  display: block;
  margin-bottom: 7px;
  color: #34393f;
  font-size: 12px;
  font-weight: 750;
}

.at-field :where(input, select),
.at-sort-form select {
  width: 100%;
  min-height: 43px;
  padding: 0 36px 0 11px;
  color: #31363c;
  background-color: #fff;
  border: 1px solid #ccd1d6;
  border-radius: 4px;
  font: 13px/1.2 inherit;
}

.at-check {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 28px;
  margin: 4px 0;
  color: #3e444b;
  font-size: 12px;
  cursor: pointer;
}

.at-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--directory-yellow);
}

.at-check small {
  color: #777d84;
  font-size: 10px;
}

.at-stars,
.at-company-rating > span {
  color: #f2b600;
  letter-spacing: .04em;
}

.at-clear-rating {
  display: inline-block;
  margin-top: 8px;
  color: #6d737a;
  font-size: 11px;
}

.at-filter-actions {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--directory-line);
}

.at-filter-submit {
  width: 100%;
  min-height: 43px;
  padding: 9px 13px;
  color: #fff;
  background: #15181b;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.at-filter-reset {
  color: #5e646b;
  text-align: center;
  font-size: 11px;
}

.at-directory-results {
  min-width: 0;
}

.at-results-toolbar {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
}

.at-results-toolbar > span {
  color: var(--directory-muted);
  font-size: 12px;
}

.at-sort-form {
  display: flex;
  gap: 8px;
}

.at-sort-form label {
  width: 235px;
}

.at-sort-form select {
  min-height: 40px;
}

.at-sort-form button {
  min-height: 40px;
  padding: 8px 12px;
  color: #2e3338;
  background: #fff;
  border: 1px solid #ccd1d6;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.at-company-list {
  display: grid;
  gap: 10px;
}

.at-company-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 230px;
  overflow: hidden;
  color: var(--directory-ink);
  background: #fff;
  border: 1px solid var(--directory-line);
  border-radius: 5px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.at-company-card:hover {
  border-color: #c9ced3;
  box-shadow: 0 8px 24px rgba(20, 25, 30, .055);
}

.at-company-media {
  min-height: 150px;
  display: block;
  overflow: hidden;
  color: #fff;
  background: #15181b;
  text-decoration: none;
}

.at-company-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.at-company-media.is-fallback {
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 196, 0, .18), transparent 55%),
    radial-gradient(circle at 80% 20%, #353a3f 0, #171a1d 44%, #090a0b 100%);
}

.at-company-media.is-fallback span {
  color: var(--directory-yellow);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.at-company-media.is-fallback small {
  color: #c6cacf;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
}

.at-company-main {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid #eceef0;
}

.at-company-eyebrow {
  margin-bottom: 4px;
  color: #71777e;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}

.at-company-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.at-company-main h2 {
  margin: 0 0 7px;
  font-size: 20px;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.at-company-main h2 a {
  color: var(--directory-ink);
  text-decoration: none;
}

.at-company-services {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 7px;
}

.at-company-services a {
  color: #4f555c;
  text-decoration: none;
  font-size: 11px;
  font-weight: 650;
}

.at-company-main p {
  display: -webkit-box;
  margin: 5px 0 8px;
  overflow: hidden;
  color: #4d535a;
  font-size: 12px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.at-company-address,
.at-company-phone,
.at-company-hours {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: #5e646b;
  font-size: 11px;
  line-height: 1.4;
}

.at-company-address svg,
.at-company-phone svg,
.at-company-hours svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.at-company-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  padding: 17px 18px;
}

.at-company-rating {
  display: flex;
  gap: 7px;
  align-items: center;
}

.at-company-rating > span {
  white-space: nowrap;
  font-size: 15px;
}

.at-company-rating small {
  color: #666d74;
  font-size: 10px;
}

.at-company-rating.is-empty > span {
  color: #cdd1d5;
}

.at-company-phone {
  color: #22272c;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.at-company-hours {
  color: #60666d;
}

.at-company-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.at-company-buttons a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #262b30;
  background: #fff;
  border: 1px solid #cfd4d9;
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.at-company-more {
  min-width: 94px;
  padding: 8px 13px;
}

.at-company-website {
  width: 36px;
  flex: 0 0 36px;
}

.at-company-buttons a:hover {
  border-color: #d0a000;
  background: #fffaf0;
}

.at-directory-empty {
  padding: 55px 24px;
  border: 1px dashed #bac0c6;
  border-radius: 5px;
  text-align: center;
}

.at-directory-empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.at-directory-empty p {
  margin: 0;
  color: var(--directory-muted);
}

.at-directory-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
}

.at-directory-pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #30353a;
  background: #fff;
  border: 1px solid var(--directory-line);
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
}

.at-directory-pagination .current {
  color: #17191b;
  background: var(--directory-yellow);
  border-color: var(--directory-yellow);
  font-weight: 800;
}

.at-activity-index {
  margin-top: 60px;
  padding-top: 38px;
  border-top: 1px solid var(--directory-line);
}

.at-activity-index h2 {
  margin: 0 0 22px;
  font-size: 28px;
}

.at-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 30px;
}

.at-activity-grid a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  color: var(--directory-ink);
  border-bottom: 1px solid var(--directory-line);
  text-decoration: none;
  font-size: 13px;
}

.at-activity-grid small {
  color: var(--directory-muted);
}

.at-directory :where(a, button, input, select, summary):focus-visible {
  outline: 3px solid rgba(255, 196, 0, .45);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .at-directory-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
  }

  .at-company-card {
    grid-template-columns: 190px minmax(0, 1fr) 205px;
  }

  .at-company-main {
    padding-inline: 18px;
  }
}

@media (max-width: 920px) {
  .at-directory-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .at-directory-summary {
    justify-content: space-between;
  }

  .at-directory-layout {
    grid-template-columns: 1fr;
  }

  .at-directory-filter {
    position: static;
  }

  .at-directory-filter > summary {
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 800;
  }

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

  .at-directory-filter > summary span {
    color: #a87d00;
    font-size: 21px;
    transition: transform .18s ease;
  }

  .at-directory-filter[open] > summary span {
    transform: rotate(45deg);
  }

  .at-filter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--directory-line);
  }

  .at-filter-content > form {
    border-left: 1px solid var(--directory-line);
  }

  .at-filter-categories {
    border-top: 0 !important;
  }
}

@media (max-width: 760px) {
  .at-company-card {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .at-company-media {
    grid-row: 1 / span 2;
  }

  .at-company-main {
    border-right: 0;
  }

  .at-company-actions {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
    border-top: 0;
  }

  .at-company-rating,
  .at-company-buttons {
    grid-column: auto;
  }

  .at-company-phone,
  .at-company-hours {
    display: none;
  }

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

@media (max-width: 600px) {
  .at-directory {
    padding: 26px 0 52px;
  }

  .at-directory-shell {
    width: min(calc(100% - 30px), 1600px);
  }

  .at-directory h1 {
    font-size: 34px;
  }

  .at-directory-lead {
    margin-top: 16px;
    font-size: 15px;
  }

  .at-directory-summary {
    display: block;
  }

  .at-directory-summary p {
    margin-bottom: 12px;
  }

  .at-view-switch {
    width: 100%;
  }

  .at-view-switch > :where(a, span) {
    min-width: 0;
    flex: 1;
  }

  .at-filter-content {
    display: block;
  }

  .at-filter-content > form {
    border-left: 0;
  }

  .at-results-toolbar {
    display: block;
  }

  .at-results-toolbar > span {
    display: block;
    margin-top: 9px;
  }

  .at-sort-form label {
    width: auto;
    flex: 1;
  }

  .at-company-card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 0;
  }

  .at-company-media,
  .at-company-media img {
    min-height: 132px;
  }

  .at-company-media.is-fallback span {
    font-size: 38px;
  }

  .at-company-media.is-fallback small {
    font-size: 7px;
  }

  .at-company-main {
    padding: 14px;
  }

  .at-company-main h2 {
    font-size: 17px;
  }

  .at-company-main p,
  .at-company-address {
    display: none;
  }

  .at-company-services {
    margin-bottom: 0;
  }

  .at-company-actions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px 13px;
    border-top: 1px solid #eceef0;
  }

  .at-company-rating > span {
    font-size: 13px;
  }

  .at-activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-company-card,
  .at-directory-filter > summary span {
    transition: none;
  }
}
