* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  color: #1d2733;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

header, main, footer {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header { padding-top: 40px; padding-bottom: 12px; }
header h1 { margin: 0; font-size: 2.2rem; color: #173e70; }

main { flex: 1; padding-top: 20px; padding-bottom: 48px; }

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 14px #0000001a;
  transition: transform .15s ease, box-shadow .15s ease;
}

.tile:hover, .tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px #00000026;
}

.tile:focus-visible { outline: 3px solid #1e5aa8; outline-offset: 3px; }

.tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  padding: 16px;
}

.tile-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px 20px;
  border-top: 1px solid #e3e8ee;
}

.tile-text strong { font-size: 1.4rem; color: #173e70; }

.tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1e5aa8;
  font-size: .85rem;
  font-weight: 600;
}

footer {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: 1px solid #dde3ea;
  font-size: .95rem;
}

footer a { color: #4a5866; }
footer a:hover { color: #173e70; }
