:root {
  --bg: #f7f4ef;
  --panel: #fffdf9;
  --ink: #1f1f1f;
  --muted: #6c665f;
  --line: #ded2c5;
  --accent: #d94f72;
  --accent-dark: #b73758;
  --grid-border: #f4a7a7;
  --shadow: 0 14px 38px rgba(58, 42, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.home {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.home-shell {
  width: min(980px, 100%);
}

.home-header {
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

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

.tool-button {
  min-height: 360px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 24px;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.tool-button:hover {
  border-color: #c7b8a6;
  background: #fff8f1;
}

.tool-button:active {
  transform: translateY(1px);
}

.tool-button strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.tool-visual {
  min-height: 230px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.maze-visual {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  border: 4px solid var(--grid-border);
}

.maze-visual span {
  border-right: 2px solid #222;
  border-bottom: 2px solid #222;
}

.maze-visual span:nth-child(5n) {
  border-right: 0;
}

.maze-visual span:nth-last-child(-n + 5) {
  border-bottom: 0;
}

.maze-visual::after {
  content: "";
  width: 72%;
  height: 72%;
  align-self: center;
  justify-self: center;
  grid-area: 1 / 1 / -1 / -1;
  border-top: 8px solid #222;
  border-right: 8px solid #222;
  border-bottom: 8px solid #222;
  transform: rotate(8deg);
}

.spiral-visual {
  place-items: center;
}

.spiral-visual span {
  width: min(72%, 240px);
  aspect-ratio: 1;
  border: 8px solid #222;
  border-left-color: transparent;
  border-radius: 50%;
  position: relative;
}

.spiral-visual span::before,
.spiral-visual span::after {
  content: "";
  position: absolute;
  inset: 24%;
  border: 8px solid #222;
  border-right-color: transparent;
  border-radius: 50%;
}

.spiral-visual span::after {
  inset: 48%;
  border-width: 7px;
  border-left-color: #222;
  border-top-color: transparent;
}

@media (max-width: 700px) {
  .home {
    place-items: start;
    padding: 18px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-button {
    min-height: 260px;
  }

  .tool-visual {
    min-height: 150px;
  }
}
