.mr-error-page {
  --mr-error-primary: #0b45ad;
  --mr-error-accent: #08a8d6;
  --mr-error-deep: #061d58;
  --mr-error-ink: #0b1429;
  --mr-error-muted: #68748d;
  --mr-error-line: rgba(11, 69, 173, 0.15);
  --mr-error-soft: rgba(8, 168, 214, 0.09);
  --mr-error-glow: rgba(8, 168, 214, 0.2);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(560px, calc(100svh - 290px), 780px);
  place-items: center;
  width: 100%;
  padding: clamp(28px, 5vw, 76px) 0;
}

.promo-public .mr-error-page {
  --mr-error-primary: #7e1ce1;
  --mr-error-accent: #ff7602;
  --mr-error-deep: #35164e;
  --mr-error-ink: #24122e;
  --mr-error-muted: #716979;
  --mr-error-line: rgba(126, 28, 225, 0.16);
  --mr-error-soft: rgba(126, 28, 225, 0.08);
  --mr-error-glow: rgba(255, 118, 2, 0.2);
}

.ritmo-public .mr-error-page {
  --mr-error-primary: #0b42a7;
  --mr-error-accent: #08a7d6;
  --mr-error-deep: #061f60;
  --mr-error-ink: #0b1429;
  --mr-error-muted: #6d7890;
  --mr-error-line: rgba(11, 66, 167, 0.15);
  --mr-error-soft: rgba(8, 167, 214, 0.09);
  --mr-error-glow: rgba(8, 167, 214, 0.2);
}

.mr-error-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 5vw, 78px);
  width: 100%;
  overflow: hidden;
  padding: clamp(34px, 5vw, 76px);
  border: 1px solid var(--mr-error-line);
  border-radius: clamp(28px, 3vw, 46px);
  background:
    radial-gradient(circle at 92% 8%, var(--mr-error-glow), transparent 34%),
    linear-gradient(135deg, #fff 0%, #fff 58%, var(--mr-error-soft) 100%);
  box-shadow: 0 24px 70px rgba(8, 30, 76, 0.09);
}

.promo-public .mr-error-shell {
  border-radius: clamp(34px, 4vw, 58px);
  box-shadow: 0 26px 76px rgba(53, 22, 78, 0.12);
}

.mr-error-shell::before {
  position: absolute;
  z-index: -1;
  top: -110px;
  right: -80px;
  width: 330px;
  height: 330px;
  border: 1px solid var(--mr-error-line);
  border-radius: 50%;
  content: "";
}

.mr-error-copy {
  min-width: 0;
}

.mr-error-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--mr-error-primary);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mr-error-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mr-error-accent);
  box-shadow: 0 0 0 7px var(--mr-error-soft);
}

.mr-error-copy h1 {
  max-width: 820px;
  margin: 0;
  color: var(--mr-error-ink);
  font-size: clamp(2.25rem, 4.2vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.01;
  text-wrap: balance;
}

.mr-error-lead {
  max-width: 720px;
  margin: clamp(18px, 2vw, 26px) 0 0;
  color: var(--mr-error-muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 500;
  line-height: 1.58;
}

.mr-error-notice {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  max-width: 760px;
  margin-top: clamp(24px, 3vw, 36px);
  padding: 20px 22px;
  border: 1px solid var(--mr-error-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.mr-error-notice-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  color: var(--mr-error-primary);
  background: var(--mr-error-soft);
}

.mr-error-notice-icon svg,
.mr-error-signal svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.mr-error-notice h2 {
  margin: 0 0 5px;
  color: var(--mr-error-ink);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  font-weight: 800;
  line-height: 1.25;
}

.mr-error-notice p {
  margin: 0;
  color: var(--mr-error-muted);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.52;
}

.mr-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 34px);
}

.mr-error-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--mr-error-line);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.mr-error-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.mr-error-action.is-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(115deg, var(--mr-error-deep), var(--mr-error-primary), var(--mr-error-accent));
  box-shadow: 0 14px 30px var(--mr-error-glow);
}

.mr-error-action.is-secondary {
  color: var(--mr-error-primary);
  background: rgba(255, 255, 255, 0.82);
}

.mr-error-action:hover,
.mr-error-action:focus-visible {
  transform: translateY(-2px);
  border-color: var(--mr-error-accent);
  box-shadow: 0 16px 34px var(--mr-error-glow);
}

.mr-error-visual {
  position: relative;
  display: grid;
  width: min(100%, 430px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  color: var(--mr-error-primary);
}

.mr-error-code {
  position: relative;
  z-index: 3;
  color: var(--mr-error-deep);
  font-size: clamp(5.2rem, 10vw, 9.2rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 1;
  text-shadow: 0 12px 32px var(--mr-error-glow);
}

.mr-error-orbit {
  position: absolute;
  border: 1px solid var(--mr-error-line);
  border-radius: 50%;
}

.mr-error-orbit.is-outer {
  inset: 4%;
  border-style: dashed;
}

.mr-error-orbit.is-inner {
  inset: 20%;
  background: radial-gradient(circle at 65% 30%, #fff, var(--mr-error-soft));
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.42), 0 24px 54px var(--mr-error-glow);
}

.mr-error-signal {
  position: absolute;
  z-index: 4;
  right: 12%;
  bottom: 15%;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 7px solid #fff;
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(145deg, var(--mr-error-primary), var(--mr-error-accent));
  box-shadow: 0 16px 34px var(--mr-error-glow);
}

.mr-error-dot {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: var(--mr-error-accent);
  box-shadow: 0 0 0 7px var(--mr-error-soft);
}

.mr-error-dot.is-one { top: 11%; left: 24%; width: 13px; height: 13px; }
.mr-error-dot.is-two { top: 28%; right: 8%; width: 9px; height: 9px; }
.mr-error-dot.is-three { bottom: 11%; left: 18%; width: 8px; height: 8px; }

@media (max-width: 980px) {
  .mr-error-page {
    min-height: auto;
    padding: 24px 0 38px;
  }

  .mr-error-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .mr-error-visual {
    grid-row: 1;
    width: min(62vw, 300px);
  }

  .mr-error-copy {
    text-align: center;
  }

  .mr-error-kicker,
  .mr-error-actions {
    justify-content: center;
  }

  .mr-error-lead,
  .mr-error-notice {
    margin-right: auto;
    margin-left: auto;
  }

  .mr-error-notice {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .mr-error-page {
    padding: 14px 0 28px;
  }

  .mr-error-shell {
    gap: 14px;
    padding: 28px 20px 30px;
    border-radius: 26px;
  }

  .promo-public .mr-error-shell {
    border-radius: 30px;
  }

  .mr-error-visual {
    width: min(68vw, 238px);
  }

  .mr-error-copy h1 {
    font-size: clamp(2rem, 10.3vw, 3rem);
    line-height: 1.04;
  }

  .mr-error-lead {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .mr-error-notice {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    padding: 17px;
    border-radius: 18px;
  }

  .mr-error-notice-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .mr-error-notice-icon svg {
    width: 25px;
  }

  .mr-error-notice p {
    font-size: 0.87rem;
  }

  .mr-error-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mr-error-action {
    width: 100%;
  }

  .mr-error-signal {
    width: 54px;
    height: 54px;
    border-width: 6px;
    border-radius: 17px;
  }
}

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