:root {
  color: #222222;
  background: #f7f8fc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 48px 20px;
}

main {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

header {
  max-width: 620px;
  margin: 0 auto 36px;
  text-align: center;
}

h1 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.2;
}

header p {
  margin: 0;
  color: #666666;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-link {
  display: grid;
  min-height: 132px;
  padding: 20px 12px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #263044;
  background: #ffffff;
  border: 1px solid #dde1e8;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.category-link:hover,
.category-link:focus-visible {
  background: #f1f4fa;
  border-color: #9da8bb;
  outline: none;
}

.category-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #26345f;
  background: #eef1f7;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 760px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  body { padding: 30px 14px; }
  h1 { font-size: 29px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-link { min-height: 116px; padding: 16px 8px; }
}
