.bm-tietopankki-page main,
.bm-category-page main {
  color: #403c3a;
}

.bm-tietopankki-page .page-header h1,
.bm-category-page .content-category h1 {
  margin: 0 0 12px;
  color: #2f2c2a;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
}

.bm-tietopankki-intro,
.bm-category-page .category-desc {
  max-width: 640px;
  margin: 0 0 22px;
  color: #403c3a;
  font-size: 15px;
  line-height: 1.65;
}

.bm-tietopankki-intro p,
.bm-category-page .category-desc p {
  margin: 0;
}

.bm-tietopankki-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0 0;
}

.bm-tietopankki-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 150px;
  padding: 16px 16px 14px;
  color: #403c3a;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d7e1e8;
  border-left: 3px solid var(--bm-link, #1897c6);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 40, 80, .08);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.bm-tietopankki-card:hover,
.bm-tietopankki-card:focus {
  color: #403c3a;
  text-decoration: none;
  border-color: #a9cce0;
  border-left-color: #006fa5;
  box-shadow: 0 4px 10px rgba(0, 50, 90, .13);
  transform: translateY(-1px);
}

.bm-tietopankki-card h3 {
  margin: 0 0 9px;
  color: var(--bm-link, #1897c6);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.22;
}

.bm-tietopankki-card p {
  margin: 0 0 14px;
  color: #403c3a;
  font-size: 14px;
  line-height: 1.5;
}

.bm-tietopankki-count {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 8px;
  color: #174a61;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  background: #eaf5fb;
  border: 1px solid #c7e2f0;
  border-radius: 4px;
}

.bm-knowledge-list {
  margin: 18px 0 0;
}

.bm-knowledge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.bm-knowledge-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #d7e1e8;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 40, 80, .08);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.bm-knowledge-card:hover,
.bm-knowledge-card:focus-within {
  border-color: #a9cce0;
  box-shadow: 0 4px 10px rgba(0, 50, 90, .13);
  transform: translateY(-1px);
}

.bm-knowledge-card__link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.bm-knowledge-card__link:hover,
.bm-knowledge-card__link:focus {
  color: inherit;
  text-decoration: none;
}

.bm-knowledge-card__media {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #eaf2f6;
  overflow: hidden;
}

.bm-knowledge-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bm-knowledge-card__body {
  padding: 14px 15px 15px;
}

.bm-knowledge-card__body h2 {
  margin: 0 0 8px;
  color: var(--bm-link, #1897c6);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.bm-knowledge-card__body p {
  margin: 0;
  color: #403c3a;
  font-size: 14px;
  line-height: 1.52;
}

@media (min-width: 640px) {
  .bm-tietopankki-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 575.98px) {
  .bm-tietopankki-page .page-header h1,
  .bm-category-page .content-category h1 {
    font-size: 26px;
  }

  .bm-tietopankki-card {
    min-height: 0;
  }
}
