.error-main {
  padding: 34px 0 72px;
}

.error-stage {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
  position: relative;
}

.error-copy {
  position: relative;
  padding: clamp(26px, 5vw, 54px) 0;
}

.error-code {
  margin: 0 0 -14px;
  color: rgba(49, 91, 73, 0.12);
  font-family: var(--font-serif);
  font-size: clamp(7rem, 17vw, 13rem);
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: 0;
  user-select: none;
}

.error-copy h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 5vw, 4.3rem);
}

.error-copy .intro {
  max-width: 650px;
}

.error-media {
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.error-screen {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 26px;
  overflow: hidden;
  border: 9px solid #2d2d2b;
  border-bottom-width: 22px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, rgba(0, 0, 0, 0.025) 50%),
    #111;
  background-size: 100% 4px;
  box-shadow:
    inset 0 0 32px rgba(0, 0, 0, 0.58),
    0 18px 38px rgba(44, 35, 24, 0.2);
}

.error-screen img {
  width: 320px;
  height: auto;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.error-media figcaption {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.error-media figcaption strong {
  font-family: var(--font-serif);
  font-size: 1.45rem;
}

.error-media figcaption span,
.media-credit p {
  color: var(--muted);
  line-height: 1.6;
}

.media-credit {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.media-credit summary {
  width: max-content;
  color: var(--leaf);
  cursor: pointer;
  font-weight: 850;
}

.media-credit p {
  margin: 10px 0 0;
}

.error-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.error-shortcuts a {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 38px rgba(79, 58, 32, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.error-shortcuts a:hover {
  transform: translateY(-3px);
  border-color: rgba(49, 91, 73, 0.34);
  background: rgba(255, 255, 255, 0.94);
}

.error-shortcuts span {
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.error-shortcuts strong {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.14;
}

@media (max-width: 900px) {
  .error-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .error-copy {
    padding-bottom: 0;
  }

  .error-media {
    width: min(560px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .error-main {
    padding-top: 18px;
  }

  .error-code {
    margin-bottom: -6px;
    font-size: 7.4rem;
  }

  .error-copy h1 {
    font-size: 2.72rem;
  }

  .error-media {
    padding: 14px;
  }

  .error-screen {
    min-height: 0;
    padding: 12px;
    border-width: 7px;
    border-bottom-width: 17px;
  }

  .error-shortcuts {
    grid-template-columns: 1fr;
  }
}

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