:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f4f7fb;
  color: #09275b;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

.tool-matrix {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.tool-matrix__back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #164d9a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.tool-matrix__back:hover {
  color: #a87800;
}

.tool-matrix__back:focus-visible,
.tool-card:focus-visible {
  outline: 3px solid #0e65ba;
  outline-offset: 3px;
}

.tool-matrix__heading {
  max-width: 700px;
  margin-top: 38px;
}

.tool-matrix__kicker {
  margin: 0;
  color: #b88000;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.tool-matrix h1 {
  margin: 9px 0 0;
  color: #082b62;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-size: 42px;
  line-height: 1.2;
}

.tool-matrix__description {
  margin: 15px 0 0;
  color: #4d6484;
  font-size: 16px;
  line-height: 1.7;
}

.tool-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  min-height: 146px;
  padding: 21px 19px;
  display: flex;
  flex-direction: column;
  border: 1px solid #c8d4e5;
  border-radius: 6px;
  color: #09275b;
  background: #fff;
  box-shadow: 0 5px 12px rgba(19, 66, 128, 0.06);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: #e2b931;
  box-shadow: 0 12px 24px rgba(19, 66, 128, 0.12);
}

.tool-card__index {
  color: #c18c00;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
}

.tool-card__name {
  margin-top: 15px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.tool-card__action {
  margin-top: auto;
  color: #1558ac;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .tool-matrix {
    width: calc(100% - 32px);
    padding: 30px 0 38px;
  }

  .tool-matrix__heading {
    margin-top: 28px;
  }

  .tool-matrix h1 {
    font-size: 32px;
  }

  .tool-matrix__description {
    font-size: 14px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .tool-card {
    min-height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card {
    transition: none;
  }
}
