/* 机构黄页页面样式 —— 复用 styles.css 的头尾与色系变量 */

:root {
  --dir-bg-soft: #f5f8fc;
  --dir-line-soft: #e8edf4;
}

/* ---------- 面包屑：检索区下方深色条，滚动时贴在导航下 ---------- */

.dir-crumbs-bar {
  position: sticky;
  top: 78px;
  z-index: 150;
  background: #102a56;
  box-shadow: 0 6px 18px rgba(16, 42, 86, 0.22);
}

.dir-crumbs-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #d7e4f5;
}

.dir-crumbs-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  background: #e8b339;
  color: #102a56;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dir-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dir-crumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.dir-crumb-item + .dir-crumb-item::before {
  content: ">";
  margin: 0 8px;
  color: #8fb0d8;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.dir-crumb {
  max-width: 18em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
}

a.dir-crumb,
button.dir-crumb {
  padding: 2px 0;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a.dir-crumb:hover,
button.dir-crumb:hover,
a.dir-crumb:focus-visible,
button.dir-crumb:focus-visible {
  color: #ffd56a;
  text-decoration: underline;
}

.dir-crumb-current {
  color: #ffd56a;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .dir-crumbs-bar {
    top: 72px;
  }
}

@media (max-width: 640px) {
  .dir-crumbs-inner {
    padding: 10px 0;
    font-size: 13px;
    gap: 8px;
  }

  .dir-crumb {
    max-width: 10em;
  }
}

/* ---------- 顶部搜索区 ---------- */

.dir-hero {
  position: relative;
  color: var(--white);
  padding: 56px 0 64px;
  background:
    linear-gradient(135deg, rgba(6, 38, 76, 0.96) 0%, rgba(11, 99, 184, 0.9) 55%, rgba(23, 128, 214, 0.86) 100%),
    url("./assets/banner-texture.jpeg") center / cover no-repeat;
}

.dir-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(245, 248, 252, 0.14) 100%);
  pointer-events: none;
}

.dir-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
}

.dir-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.dir-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.dir-hero-desc {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
}

/* 搜索条 */

.dir-searchbar {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 30px 0 0;
  max-width: 860px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(3, 26, 54, 0.28);
  overflow: hidden;
}

.dir-searchbar-city {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-left: 16px;
  border-right: 1px solid var(--dir-line-soft, #e8edf4);
}

.dir-searchbar-icon {
  font-size: 15px;
  color: var(--brand);
  margin-right: 4px;
}

.dir-searchbar-city select {
  height: 60px;
  max-width: 190px;
  padding: 0 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  background: transparent;
  border: none;
  cursor: pointer;
}

.dir-searchbar-city select:focus {
  outline: none;
}

.dir-searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 60px;
  padding: 0 18px;
  font: inherit;
  font-size: 16px;
  color: var(--heading);
  border: none;
  background: transparent;
}

.dir-searchbar input:focus {
  outline: none;
}

.dir-searchbar input::placeholder {
  color: #9fb0c4;
}

.dir-searchbar-btn {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 0 32px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
}

.dir-searchbar-btn:hover {
  filter: brightness(1.1);
}

.dir-hot-cats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 18px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.dir-hot-cats-label {
  color: rgba(255, 255, 255, 0.6);
}

.dir-hot-cat {
  padding: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.92);
  background: none;
  border: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.dir-hot-cat:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* 统计条 */

.dir-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 34px 0 0;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
}

.dir-hero-links {
  margin: 18px 0 0;
  font-size: 14px;
}

.dir-hero-links a {
  color: #cfe6ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(207, 230, 255, 0.5);
  padding-bottom: 2px;
}

.dir-hero-links a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

.dir-stats > div {
  padding: 16px 20px;
  background: rgba(4, 30, 60, 0.34);
  backdrop-filter: blur(6px);
}

.dir-stats dt {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.dir-stats dd {
  margin: 6px 0 0;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* ---------- 通用区块 ---------- */

.dir-block {
  padding: 64px 0;
}

.dir-block-cats {
  background: #f5f8fc;
}

.dir-block-cities {
  background: var(--white);
}

.dir-block-result {
  background: #f5f8fc;
  padding-bottom: 84px;
}

.dir-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e8edf4;
}

.dir-block-head h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  color: var(--heading);
  position: relative;
  padding-left: 14px;
}

.dir-block-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--brand);
}

.dir-block-head p {
  margin: 8px 0 0;
  padding-left: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 分类矩阵 ---------- */

.dir-cat-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.dir-cat-card {
  --accent: var(--brand);
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--white);
  border: 1px solid #e8edf4;
  border-radius: 10px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.dir-cat-card:nth-child(7n + 1) { --accent: #0b63b8; }
.dir-cat-card:nth-child(7n + 2) { --accent: #0e9488; }
.dir-cat-card:nth-child(7n + 3) { --accent: #7c5cd6; }
.dir-cat-card:nth-child(7n + 4) { --accent: #d97706; }
.dir-cat-card:nth-child(7n + 5) { --accent: #dc4b6a; }
.dir-cat-card:nth-child(7n + 6) { --accent: #1d7fd4; }
.dir-cat-card:nth-child(7n + 7) { --accent: #45884a; }

.dir-cat-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #e8edf4);
  box-shadow: 0 16px 38px rgba(15, 35, 66, 0.09);
  transform: translateY(-3px);
}

.dir-cat-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed #e8edf4;
}

.dir-cat-card-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-radius: 9px;
}

.dir-cat-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
}

.dir-cat-card-total {
  margin: 3px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.dir-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dir-cat-link {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: #f7f9fc;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.dir-cat-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  border-color: color-mix(in srgb, var(--accent) 32%, #fff);
}

.dir-cat-link .dir-num {
  font-size: 12px;
  color: #a3b1c2;
  font-variant-numeric: tabular-nums;
}

.dir-cat-link:hover .dir-num {
  color: var(--accent);
}

/* ---------- 城市导航 ---------- */

.dir-city-hot {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 26px;
  background: linear-gradient(135deg, #f2f7fd 0%, #f8fafc 100%);
  border: 1px solid #e8edf4;
  border-radius: 10px;
}

.dir-city-hot-label {
  flex: 0 0 auto;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

.dir-city-hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-city-hot-list button {
  padding: 7px 15px;
  font: inherit;
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  border: 1px solid #dde5ee;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.dir-city-hot-list button:hover {
  color: var(--white);
  background: var(--brand);
  border-color: var(--brand);
}

.dir-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid #e8edf4;
}

.dir-letter {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: #f5f8fc;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.dir-letter:hover:not(:disabled) {
  color: var(--brand);
  background: rgba(11, 99, 184, 0.1);
}

.dir-letter[aria-pressed="true"] {
  color: var(--white);
  background: var(--brand);
}

.dir-letter:disabled {
  color: #cbd5e1;
  cursor: default;
}

.dir-city-groups {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-city-group {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed #eef2f7;
}

.dir-city-group:last-child {
  border-bottom: none;
}

.dir-city-group-letter {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.dir-city-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.dir-city-link {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--heading);
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.dir-city-link:hover {
  color: var(--brand);
  background: rgba(11, 99, 184, 0.07);
  border-color: rgba(11, 99, 184, 0.24);
}

.dir-city-link[aria-current="true"] {
  color: var(--white);
  background: var(--brand);
  border-color: var(--brand);
}

.dir-city-link .dir-num {
  font-size: 12px;
  color: #a3b1c2;
  font-variant-numeric: tabular-nums;
}

.dir-city-link[aria-current="true"] .dir-num {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- 检索工具条 ---------- */

.dir-toolbar {
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid #e8edf4;
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(15, 35, 66, 0.05);
}

.dir-toolbar-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 14px 16px;
  align-items: end;
}

.dir-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.dir-field label {
  font-size: 13px;
  color: var(--muted);
}

.dir-field select {
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--heading);
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
}

.dir-field select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 99, 184, 0.12);
}

.dir-field select:disabled {
  color: #9ca3af;
  cursor: default;
}

.dir-reset {
  height: 44px;
  padding: 0 22px;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid #dde5ee;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.dir-reset:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.dir-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #e8edf4;
}

.dir-chip {
  padding: 7px 15px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: #f7f9fc;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.dir-chip:hover {
  color: var(--brand);
  border-color: rgba(11, 99, 184, 0.3);
}

.dir-chip[aria-pressed="true"] {
  color: var(--white);
  background: var(--brand);
  border-color: var(--brand);
}

.dir-chip .dir-num {
  margin-left: 5px;
  font-size: 12px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

/* ---------- 结果区 ---------- */

.dir-result-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 28px 0 0;
}

.dir-page-overview {
  margin: 0;
  max-width: 920px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  text-align: justify;
}

.dir-page-overview:empty {
  display: none;
}

.dir-result-count {
  margin: 0;
  font-size: 16px;
  color: var(--heading);
}

.dir-result-count strong {
  color: var(--brand);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.dir-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.dir-active-filters:empty {
  margin: 0;
}

.dir-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 12px;
  font-size: 13px;
  color: var(--brand);
  background: rgba(11, 99, 184, 0.08);
  border: 1px solid rgba(11, 99, 184, 0.2);
  border-radius: 4px;
}

.dir-tag button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--brand);
  background: rgba(11, 99, 184, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.dir-tag button:hover {
  color: var(--white);
  background: var(--brand);
}

.dir-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid #e8edf4;
  border-radius: 10px;
  transition: box-shadow 0.22s, border-color 0.22s, transform 0.22s;
}

.dir-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.22s;
}

.dir-card:hover {
  border-color: rgba(11, 99, 184, 0.34);
  box-shadow: 0 14px 34px rgba(15, 35, 66, 0.09);
  transform: translateY(-2px);
}

.dir-card:hover::before {
  opacity: 1;
}

.dir-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dir-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--heading);
}

.dir-card-tag {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--brand);
  background: rgba(11, 99, 184, 0.08);
  border-radius: 4px;
  white-space: nowrap;
}

.dir-card-overview {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #4b5c6e;
  text-align: justify;
}

.dir-card-meta {
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.dir-card-label {
  flex: 0 0 auto;
  color: #a3b1c2;
}

.dir-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed #eef2f7;
}

.dir-card-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 13px;
  color: var(--brand);
  border: 1px solid rgba(11, 99, 184, 0.28);
  border-radius: 5px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dir-card-actions a:hover {
  color: var(--white);
  background: var(--brand);
  border-color: var(--brand);
}

.dir-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed #dde5ee;
  border-radius: 10px;
}

.dir-more-wrap {
  text-align: center;
}

.dir-more {
  margin-top: 28px;
  min-width: 220px;
  height: 50px;
  padding: 0 30px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  background: var(--white);
  border: 1px solid rgba(11, 99, 184, 0.34);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.dir-more:hover {
  color: var(--white);
  background: var(--brand);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .dir-toolbar-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dir-reset {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .dir-searchbar {
    flex-wrap: wrap;
    border-radius: 8px;
  }

  .dir-searchbar-city {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid #e8edf4;
  }

  .dir-searchbar-city select {
    max-width: none;
    flex: 1;
    height: 52px;
  }

  .dir-searchbar input {
    flex: 1 1 100%;
    height: 52px;
    border-bottom: 1px solid #e8edf4;
  }

  .dir-searchbar-btn {
    flex: 1 1 100%;
    height: 52px;
  }
}

@media (max-width: 720px) {
  .dir-block {
    padding: 48px 0;
  }

  .dir-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dir-cat-matrix {
    grid-template-columns: 1fr;
  }

  .dir-city-hot {
    flex-direction: column;
    gap: 10px;
  }

  .dir-city-hot-label {
    padding-top: 0;
  }

  .dir-city-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dir-toolbar-row {
    grid-template-columns: 1fr;
  }

  .dir-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 医院排行榜 ---------- */

.rank-head {
  padding: 40px 0 32px;
  background: var(--dir-bg-soft);
  border-bottom: 1px solid var(--dir-line-soft);
}

.rank-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.rank-head h1 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35;
  color: var(--heading);
}

.rank-issuer {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.rank-issuer strong {
  color: var(--heading);
}

.rank-note {
  margin: 0;
  font-size: 13px;
  color: #7a8797;
}

.rank-cross {
  margin: 18px 0 0;
  font-size: 14px;
}

.rank-cross a {
  color: var(--brand);
  text-decoration: none;
}

.rank-cross a:hover {
  text-decoration: underline;
}

.rank-body {
  padding: 32px 0 64px;
}

.rank-toolbar {
  border-bottom: 2px solid var(--brand);
}

.rank-year-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rank-year {
  height: 38px;
  padding: 0 20px;
  font-size: 15px;
  color: #4a5a6b;
  background: #f2f5f9;
  border: 1px solid var(--dir-line-soft);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
}

.rank-year:hover {
  color: var(--brand);
}

.rank-year.is-active {
  color: var(--white);
  font-weight: 600;
  background: var(--brand);
  border-color: var(--brand);
}

.rank-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 18px;
}

.rank-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.rank-field select {
  height: 34px;
  padding: 0 8px;
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  border: 1px solid var(--dir-line-soft);
  border-radius: 3px;
}

.rank-grade-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
  color: #4a5a6b;
  background: #f2f5f9;
  border: 1px solid var(--dir-line-soft);
  border-radius: 3px;
  cursor: pointer;
}

.rank-grade i {
  font-style: normal;
  font-size: 12px;
  color: #94a3b4;
}

.rank-grade:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.rank-grade.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.rank-grade.is-active i {
  color: rgba(255, 255, 255, 0.8);
}

.rank-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rank-search {
  display: flex;
}

.rank-search input {
  width: 260px;
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--heading);
  border: 1px solid var(--dir-line-soft);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: var(--white);
}

.rank-search input:focus {
  outline: none;
  border-color: var(--brand);
}

.rank-search button {
  height: 34px;
  padding: 0 18px;
  font-size: 14px;
  color: var(--white);
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0 3px 3px 0;
  cursor: pointer;
}

.rank-search button:hover {
  background: var(--brand-dark);
}

.rank-view {
  display: flex;
  border: 1px solid var(--dir-line-soft);
  border-radius: 3px;
  overflow: hidden;
}

.rank-view button {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  color: #4a5a6b;
  background: var(--white);
  border: 0;
  cursor: pointer;
}

.rank-view button + button {
  border-left: 1px solid var(--dir-line-soft);
}

.rank-view button.is-active {
  color: var(--white);
  background: #5a6a7d;
}

.rank-count {
  margin: 16px 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.rank-count strong {
  color: #c1272d;
  font-size: 17px;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.rank-table th,
.rank-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--dir-line-soft);
}

.rank-table th {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  background: #f2f5f9;
  border-bottom: 1px solid #d8e1ec;
}

.rank-table tbody tr:hover {
  background: #f7fafd;
}

.rank-col-head,
.rank-cell-head {
  width: 92px;
  white-space: nowrap;
}

.rank-cell-rank {
  font-size: 16px;
  font-weight: 600;
  color: #5a6a7d;
}

.rank-cell-rank.is-top {
  color: #c1272d;
}

.rank-cell-name {
  color: var(--heading);
}

.rank-col-region,
.rank-cell-region {
  width: 140px;
  font-size: 13px;
  color: #7a8797;
}

.rank-col-tag,
.rank-cell-tag {
  width: 190px;
  font-size: 13px;
  color: #7a8797;
}

.rank-col-num,
.rank-cell-num {
  width: 110px;
  font-size: 14px;
  color: var(--muted);
}

.rank-cell-score {
  font-weight: 600;
  color: var(--heading);
}

.rank-card-scores {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--brand);
}

.rank-badge {
  display: inline-block;
  min-width: 58px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--brand);
  background: #eaf2fb;
  border: 1px solid #cfe0f4;
  border-radius: 3px;
}

.rank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.rank-card {
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--dir-line-soft);
  border-radius: 4px;
}

.rank-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.rank-card-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--heading);
}

.rank-card-tag {
  margin: 10px 0 0;
  font-size: 13px;
  color: #7a8797;
}

.rank-card-intro {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.rank-state {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .rank-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-toolbar-right {
    width: 100%;
  }

  .rank-search {
    flex: 1 1 200px;
  }

  .rank-search input {
    width: 100%;
    flex: 1;
  }

  .rank-year {
    height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .rank-col-region,
  .rank-cell-region,
  .rank-col-tag,
  .rank-cell-tag,
  .rank-table th.rank-col-num:not(:last-child),
  .rank-table td.rank-cell-num:not(.rank-cell-score) {
    display: none;
  }

  .rank-cards {
    grid-template-columns: 1fr;
  }
}

.dir-seo-index {
  padding: 36px 0 48px;
  background: #f7f9fc;
  border-top: 1px solid #e8edf4;
}

.dir-seo-index h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--heading);
}

.dir-seo-index p {
  margin: 0 0 16px;
  max-width: 920px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.dir-seo-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dir-seo-cities a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  color: #33506c;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 4px;
}

.dir-seo-cities a:hover {
  color: var(--brand);
  border-color: rgba(11, 99, 184, 0.35);
}
