.not-found-page {
  box-sizing: border-box;
  padding: 42px 24px 32px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 12%, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent 58%), var(--background-color);
  box-shadow: var(--redefine-box-shadow);
  color: var(--default-text-color);
  text-align: center;
}

.not-found-page p {
  margin: 0;
}

.not-found-eyebrow {
  color: var(--second-text-color);
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.not-found-eyebrow span {
  margin: 0 10px;
  color: var(--primary-color);
}

.not-found-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 32px);
  margin: 24px auto 14px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(72px, 12vw, 128px);
  font-weight: 600;
}

.not-found-number {
  flex: 0 0 auto;
  color: var(--first-text-color);
  letter-spacing: -0.055em;
  line-height: 1.15;
  user-select: none;
}

.not-found-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  /* Compensate for the original image's transparent margins. */
  height: 0.86em;
  height: 1.2cap;
  transform: translateY(0.05em);
}

.not-found-number span {
  display: inline-block;
  margin: 0 0.035em;
  color: var(--primary-color);
}

.not-found-label {
  color: var(--second-text-color);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
}

.not-found-page h1 {
  margin: 28px 0 14px;
  color: var(--first-text-color);
  font-family: "Source Han Serif SC", "Source Han Serif", "Noto Serif SC", serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  text-wrap: balance;
}

.not-found-description {
  color: var(--second-text-color);
  font-size: 0.95rem;
  line-height: 1.9;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.not-found-page .not-found-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 23px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--background-color-transparent-40);
  color: var(--first-text-color);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.not-found-page .not-found-button-primary {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary-color) 78%, #000);
  color: #fff;
}

.not-found-page .not-found-button i {
  color: inherit;
}

.not-found-page .not-found-button:hover {
  background: var(--second-background-color);
  box-shadow: var(--redefine-box-shadow);
}

.not-found-page .not-found-button-primary:hover {
  background: color-mix(in srgb, var(--primary-color) 68%, #000);
  color: #fff;
}

.not-found-page a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 5px;
}

.not-found-explore {
  max-width: 360px;
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px dashed var(--border-color);
  color: var(--second-text-color);
  font-size: 0.8rem;
  line-height: 1.8;
}

.not-found-explore nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.not-found-explore a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  color: var(--second-text-color);
  text-decoration: none;
}

.not-found-explore a:hover {
  color: var(--primary-color);
}

.not-found-separator {
  color: var(--third-text-color);
}

@media (max-width: 640px) {
  .not-found-page {
    margin-top: 16px;
    padding: 30px 16px 22px;
  }

  .not-found-page h1 {
    margin-top: 22px;
  }

  .not-found-description {
    font-size: 0.85rem;
  }

  .not-found-page .not-found-button {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .not-found-page a {
    transition: none;
  }
}
