.age-picker {
  box-sizing: border-box;
  max-width: 1120px;
}

.age-tiles {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: clamp(10px, 1.7vw, 20px);
  padding: clamp(16px, 4vw, 52px);
  border: 3px solid #ffe08d;
  border-radius: 28px;
  background: linear-gradient(#13244718, #13244742),
    url("assets/age-learning-path.webp?v=45b8ed1d36") center 62% / cover, #416642;
  box-shadow: 0 8px 0 #75613f, 0 18px 30px #12213f66;
}

.age-tiles::before {
  position: absolute;
  z-index: -1;
  inset-inline: 12%;
  inset-block-start: 50%;
  border-top: 10px dotted #fff4ba;
  filter: drop-shadow(0 2px 2px #493818);
  content: "";
}

.age-tile {
  --paper: #effce8;
  --badge: #cfefbb;
  --edge: #287442;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: clamp(10px, 2vw, 22px) 6px;
  border: 2px solid var(--edge);
  border-radius: 22px;
  background: linear-gradient(#fffdf4, var(--paper));
  color: #172e52;
  box-shadow: 0 5px 0 var(--edge), 0 12px 18px #172e5233;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
  margin-block: 0 38px;
}

.age-tile:nth-child(even) { margin-block: 38px 0; }
.age-story { --paper: #e5f5ff; --badge: #bfe6ff; --edge: #225d91; }
.age-count { --paper: #fff3dc; --badge: #ffdfa2; --edge: #895817; }
.age-school { --paper: #f6ebff; --badge: #e9cef9; --edge: #674286; }

.age-tile strong { font-size: clamp(1.12rem, 2.6vw, 1.7rem); }

.age-icon {
  display: grid;
  place-items: center;
  width: clamp(46px, 7vw, 86px);
  aspect-ratio: 1;
  border-radius: 32%;
  background: var(--badge);
  font-size: clamp(1.55rem, 4.5vw, 3.3rem);
}

.age-tile-action {
  margin-block-start: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--edge);
  color: #fff;
  font-weight: 750;
  font-size: clamp(.75rem, 1.6vw, 1rem);
}

.age-tile:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 8px #142e58;
}

@media (max-width: 750px) {
  .age-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .age-tiles::before {
    inset: 15% 50%;
    border: 0;
    border-inline-start: 7px dotted #fff4ba;
  }
  .age-tile, .age-tile:nth-child(even) { margin-block: 0; }
}

@media (max-width: 360px) {
  .age-tile { font-size: .82rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .age-tile { transition: transform 150ms ease; }
  .age-tile:active { transform: translateY(3px); }
  .age-tile:focus-visible .age-icon { animation: age-icon-hop 340ms ease-out; }
  @media (hover: hover) {
    .age-tile:hover { transform: translateY(-4px); }
    .age-tile:hover .age-icon { animation: age-icon-hop 340ms ease-out; }
  }
}

@keyframes age-icon-hop {
  45% { transform: translateY(-7px) rotate(-7deg); }
}
@media(max-width:700px){.age-tiles{background:linear-gradient(#13244718,#13244742),url("assets/age-learning-path-768.webp?v=f1554506b8") center 62%/cover,#416642}}
