/*
 * Error pages.
 *
 * Shared by the themed 404 and, in inlined form, by the static 403/500/503
 * documents. Keep the two visually in step: if a token changes here, the
 * static pages need regenerating with tools/gen-error-pages.js.
 */

.ad-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--ad-header-h, 91px));
  padding: 120px var(--ad-space-page);
  text-align: center;
}

.ad-error__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 640px;
}

/*
 * Decorative. The status code is also carried in the heading as
 * screen-reader text, so this numeral is aria-hidden and can be as large as
 * the design wants without becoming a reading obstacle.
 */
.ad-error__code {
  font-family: var(--ad-font-mono);
  font-size: clamp(72px, 14vw, 148px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ad-color-accent);
}

.ad-error__title {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--ad-color-text);
}

.ad-error__body {
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ad-color-text-secondary);
}

.ad-error__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.ad-error__actions .ad-btn {
  min-height: 52px;
  font-size: 15px;
}

.ad-error__nav {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ad-color-hairline);
  width: 100%;
}

.ad-error__nav-label {
  margin-bottom: 12px;
  font-family: var(--ad-font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
}

.ad-error__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.ad-error__nav a {
  display: inline-block;
  padding-block: 10px;
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .ad-error {
    padding: 80px var(--ad-space-page-mobile);
  }

  .ad-error__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}
