:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  background: #f7f7f5;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f7f7f5;
}

main {
  display: grid;
  align-items: center;
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.tools {
  display: grid;
  grid-template-columns: 1fr 1.55fr 1fr 1fr;
  align-items: center;
  gap: 26px;
}

.tool {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 430px;
  padding: 30px;
  color: inherit;
  background: #fff;
  border: 1px solid #e5e5e2;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 3%);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool:hover {
  transform: translateY(-4px);
  border-color: #c9c9c5;
  box-shadow: 0 14px 34px rgb(0 0 0 / 6%);
}

.tool:focus-visible {
  outline: 3px solid #151515;
  outline-offset: 4px;
}

.tool-featured {
  height: 520px;
  padding: 38px;
}

.tool-number {
  color: #e8e8e6;
  font-size: clamp(56px, 6vw, 88px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.06em;
}

.tool-name {
  display: grid;
  justify-items: start;
  gap: 12px;
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.tool-name svg {
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 1px solid #dededb;
  border-radius: 7px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

@media (max-width: 900px) {
  main {
    width: min(100% - 32px, 620px);
    padding: 28px 0;
  }

  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .tool,
  .tool-featured {
    height: 340px;
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .tools {
    grid-template-columns: 1fr;
  }

  .tool,
  .tool-featured {
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool {
    transition: none;
  }
}
